Configuring gpg-agent

Charly Avital shavital at mac.com
Sat May 6 12:52:36 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

1. Running Thunderbird 1.5.0.2, Enigmail 0.94.0, Mac OS 10.4.6, gpg
1.4.3 (compiled from source).

2. 'Use gpg-agent for passphrase handling' enabled in
Thunderbird/OpenPGP Preferences

3. use-agent enabled in gpg.conf

4. gpg-agent.conf contains:
   default-cache-ttl 1200
   pinentry-program /opt/local/bin/pinentry

5. Following two lines included in bashrc:
   GPG_TTY=`tty`
   export GPG_TTY

6. $ gpg-agent --version:
   gpg-agent (GnuPG) 1.9.20
Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

7. $ gpg2 --version:
gpg (GnuPG) 1.9.20
Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ELG
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, TIGER192, SHA256, SHA384, SHA512
Compression: Uncompressed, ZIP, ZLIB

8. $ gpg-agent
gpg-agent: gpg-agent running and available

9. $ echo "test" | gpg2 -ase -r 0xA57A8EFA | gpg2
gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
gpg: WARNING: This version of gpg is not very matured and
gpg: WARNING: only intended for testing.  Please keep using
gpg: WARNING: gpg 1.2.x, 1.3.x or 1.4.x for OpenPGP
gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
gpg: WARNING: This version of gpg is not very matured and
gpg: WARNING: only intended for testing.  Please keep using
gpg: WARNING: gpg 1.2.x, 1.3.x or 1.4.x for OpenPGP

You need a passphrase to unlock the secret key for
user: "Charly Avital <shavital at mac.com>"
1024-bit DSA key, ID 37C6D2AB, created 2002-09-26


You need a passphrase to unlock the secret key for
user: "Charly Avital (GnuPG) <shavital at mac.com>"
2048-bit ELG key, ID CE3A0945, created 2002-02-11 (main key ID A57A8EFA)

gpg: encrypted with 2048-bit ELG key, ID CE3A0945, created 2002-02-11
      "Charly Avital (GnuPG) <shavital at mac.com>"
test
gpg: Signature made Sat May  6 06:10:58 2006 EDT using DSA key ID 37C6D2AB
gpg: Good signature from "Charly Avital <shavital at mac.com>"

10. When trying to clear-sign a test message (with 'Use gpg-agent for
passphrase handling' enabled in Thunderbird/OpenPGP Preferences), the
error message is:
OpenPGP Alert
Send Operation aborted
Error - bad passphrase
gpg command line and output:
/usr/local/bin/gpg --charset utf8 --batch --no-tty --status-fd 2
- --comment 'Using GnuPG with Mozilla - http://enigmail/mozdev.org'
- --digest-algo sha256 -t --clearsign -u 0xA57A8EFA --use-agent
gpg: gpg-agent is not available in this session
gpg: can't query passphrase in batch mode
gpg: Invalid passphrase; please try again ?
gpg: can't query passphrase in batch mode
gpg: Invalid passphrase; please try again ?
gpg: can't query passphrase in batch mode
gpg: skipped "0xA57A8EFA": bad passphrase
gpg; [stdin]: clearsign failed: bad passphrase

Thanks in advance for any hint or explanation why the error message says
that

'gpg: gpg-agent is not available in this session' whereas the command
gpg-agent outputs gpg-agent: gpg-agent running and available

and 'Invalid passphrase' whereas echo "test" indicates that the
passphrase has been correctly entered.

I am running no device that requires a smart card. I only want to have
gpg-agent working to handle the passphrase when signing, and decrypting.

I am sure I have not configured something as it should be. I don't know
what that something might be.

Thanks again,
Charly
This message was signed with 'use gpg-agent for passphrase handling'
disabled. I entered the passphrase manually







-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: GnuPG for Privacy
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRFx/7s3GMi2FW4PvAQg2vwf/QWKelX4ce3+gdIY1qXFVjl9ppOSXN/Yt
TdbDAl+CeS7d2RhgBN2kS2c+vwOKlAUCUzisDx/vrU8YM2RnmKcYTLNoh2ByNxLk
ejueig8WL7g/sS40o8OjXBOWwynnHpTvnHhaO0GtI7xAMyKNIIV7mGyX5H8N2h2u
ZWN3zk5aWQzPGvsunv5u0zw4EZ772vKbI3oZdTXJSFa3Dl5zKtXXju16wWlR6yk7
X7B5nFBuUIbSmE94mU+0ZUEXD0QE3GMvPTp6C7CyCeO6CqCLGNaIL7MDJ7A+77T8
BCoXWSuSu/v/KvNq/STbHmuJEH94kBF0s/ZkIJaF2cJtHZ0vT38eDg==
=B5bP
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list