Configuring gpg-agent

Benjamin Donnachie benjamin at py-soft.co.uk
Sat May 6 19:47:27 CEST 2006


Charly Avital wrote:
> 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

I should really read messages in more detail before replying!  I hadn't
noticed that you had been able to get gpg-agent working!

> 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

Firstly, the system maintains separate copies of the environment - when
you open a terminal and add GPG_AGENT_INFO etc to the environment it
does not update the "master" copy, so when you open Thunderbird from the
Applications menu it does not know how to access gpg-agent.

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

gpg-agent uses pinentry for passphrase handling.  Under Mac OS it is
configured to use the current terminal for input.  However, when
Thunderbird / Enigmail execute gpg2 there is no terminal and therefore
it cannot get a passphrase.

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

I'm about to look into whether pinentry can be made to play nicely under
Mac OS.

Ben



More information about the Gnupg-users mailing list