Getting Mutt-NG and gpg-agent to play nice

The last time I tried getting gpg-agent to work I gave up. That was on Ubuntu, and I only spent about 5 minutes on it. This time around I spent 10 minutes on it, and it’s working like a charm.

After installing gnupg-agent and pinentry-gtk2 I fired up the following line to ~/.gnupg/gpg.conf

use-agent

I then ran gpg-agent --daemon --sh from the command line. It printed a shell command line for setting $GPG_AGENT_INFO. I copy pasted it in the shell and executed it. Then I signed two files, the first time I got a pretty dialogue (GTK2) and the second time nothing.

The gnupg-agent package comes with a script in /etc/X11/Xsession.d/ that will execute the agent on X login. Logging out and then back in, firing up an xterm and echo $GPGP_AGENT_INFO verified that it worked properly.

Next step was to get Mutt-NG to play nice. Adding set pgp_use_gpg_agent = yes didn’t quite do it. A few searches on Google revealed that I needed to remove --passphrase-fd 0 from my pgp_*_commands.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>