gpg-agent is here (finally)!

Posted by Hans Fugal Wed, 23 Mar 2005 23:55:47 GMT

I have been waiting for this for a long time. Finally, finally, it is here.

The gentoo people, bless their hearts, have documented gpg-agent more than anybody else. Thanks to them and Google I discovered that keychain supports gpg-agent, and keychain is exceptionally-well documented.

This excerpt from keychain(1) on my Debian box: This snippet would work in .bash_profile (for bash) or .zlogin (for zsh) to load two ssh keys and one gpg key:

    keychain id_rsa id_dsa 0123ABCD
        [[ -f $HOME/.keychain/$HOSTNAME-sh ]] && \
                source $HOME/.keychain/$HOSTNAME-sh
        [[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]] && \
                source  $HOME/.keychain/$HOSTNAME-sh-gpg

In addition to that, I configured my gpg-agent thusly in ~/.gnupg/gpg-agent:

pinentry-program /usr/bin/pinentry
no-grab
default-cache-ttl 28800

Now configure gpg to use the agent:

$ echo use-agent >> ~/.gnupg/gpg.conf

Tell mutt to use the agent:

$ echo set pgp_use_gpg_agent >> ~/.muttrc

mutt for some reason requires that GPG_TTY be set (thanks to dato on #mutt on freenode), so add this to your ~/.bashrc:

export GPG_TTY=`tty`

Enjoy!

Comments

(leave url/email »)

   Comment Markup Help Preview comment

Tags

asterisk audio bash bread cs diy fat food health life linux mac music osx review ruby sourdough src typo voip