Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure gpg-agent to cache my passkey for encrypted text blocks in emacs. I've gotten org-crypt to work successfully using org-crypt alone, but when I try to set up gpg-agent it fails.

when i put eval $(gpg-agent --daemon) into my .profile (i'm running off of a debian system), emacs gives the error "failed to decrypt: peculiar error". I've also tried adding the following script to my .profile as well:

eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")
if [ -f "${HOME}/.gpg-agent-info" ]; then
   . "${HOME}/.gpg-agent-info"
   export GPG_AGENT_INFO
   export SSH_AUTH_SOCK
export GPG_TTY

When I run that, emacs prompts for my password with the following string:

+---------------------------------------------------------------------------+| You need a passphrase to unlock the secret key for user:    

This shows up where the minibuffer normally is, but breaks the formatting. Additionally, it locks up my terminal and I need to kill the session entirely (I use Screen to save my session, and even that can't detach)

This sure seems like a misconfiguration somewhere but I'm really not sure how to go about debugging it. What should I do next?

share|improve this question

You must log in to answer this question.

Browse other questions tagged .