How to use gpg-agent - RFC

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


Hello,

I wrote some explanations on how to install and setup gpg-agent 
(attached).
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 
FAQ.

Thanks,

--
Sylvain
-------------- 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 (ftp://ftp.gnu.org/gnu/gettext/gettext-0.14.1.tar.gz)
./configure --prefix=/usr && make && make install
cp /usr/bin/gettext /bin/gettext

- libgpg-error-0.7 (ftp://ftp.gnupg.org/gcrypt/alpha/libgpg-error/libgpg-error-0.7.tar.gz)
  libgcrypt-1.1.94 (ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/libgcrypt-1.1.94.tar.gz)
  libassuan-0.6.6 (ftp://ftp.gnupg.org/gcrypt/alpha/libassuan/libassuan-0.6.6.tar.gz)
  libksba-0.9.7 (ftp://ftp.gnupg.org/gcrypt/alpha/libksba/libksba-0.9.7.tar.gz)
./configure && make && make install

- pth-1.4.0 (ftp://ftp.gnu.org/gnu/pth/pth-1.4.0.tar.gz)
./configure --prefix=/usr && make && make install

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

* Last, I compiled pinentry:
cvs -d:pserver:anoncvs at cvs.gnupg.org:/cvs/aegypten login # pass == anoncvs
cvs -d:pserver:anoncvs at cvs.gnupg.org:/cvs/aegypten co pinentry
sh autogen.sh
./configure
make
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