Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.