How to use gpg-agent - RFC

Sylvain Beucler beuc at
Sun Jul 4 16:14:50 CEST 2004


I wrote some explanations on how to install and setup gpg-agent 
It is meant for the Savannah FAQ so as to help its users and above all 
tell them that such a tool do exist.

I would like to know if you have any comments before I add it to the 


-------------- next part --------------
Did you know? A GPG agent is available.

People on the GnuPG mailing list recently pointed me that it is
perfectly fine to use gpg-agent from v1.9.x (available in their CVS
repository), along with your usual GPG > v1.2.x (that already has the
functionnalities to talk with an agent).

Here are some details on my installation (I used my laptop that runs
RedHat GNU/Linux 7.3 as a test machine):

* First, I installed some dependencies.

- gettext v0.14.1 (
./configure --prefix=/usr && make && make install
cp /usr/bin/gettext /bin/gettext

- libgpg-error-0.7 (
  libgcrypt-1.1.94 (
  libassuan-0.6.6 (
  libksba-0.9.7 (
./configure && make && make install

- pth-1.4.0 (
./configure --prefix=/usr && make && make install

* Then I compiled gpg-agent:
cvs -d:pserver:anoncvs at login # pass == anoncvs
cvs -d:pserver:anoncvs at co -r V1-9-9 gnupg
sh # maybe you will have to update your autotools
cd agent
make install

* Last, I compiled pinentry:
cvs -d:pserver:anoncvs at login # pass == anoncvs
cvs -d:pserver:anoncvs at co pinentry
make install

Here is how to use gpg-agent in a simple way:

echo "pinentry-program /usr/local/bin/pinentry-gtk" > ~/.gnupg/gpg-agent.conf # uses the GTK mode, the ncurses mode did not work for me
eval `gpg-agent --daemon` # start the daemon
gpg --sign -b --use-agent file.tar.gz # asked passphrase
gpg --sign -b --use-agent file2.tar.gz # did not ask passphrase
# ...
killall gpg-agent # stop the daemon

More information about the Gnupg-users mailing list