Comment 3 for bug 44755

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 44755] Re: bzr commit fails when GPG agent is unavailable

John Dong wrote:
> It gives a return code of "2", despite correctly generating a signature.
> This is the same return code as an invalid password!
>
> We might have to look at GPG's output (i.e. non-null) rather than return
> code?
>

I've found this myself. gpg returns a return code of '2' if it is unable
to connect to the gpg-agent, if 'use agent' is true (either from the
--use-agent command line or 'use-agent' is set in ~/.gnupg/gpg.conf

If you want a simple workaround, you can modify ~/.bazaar/bazaar.conf
and set:

[DEFAULT]
gpg_signing_command=gpg --no-use-agent

Then bzr will tell gpg not to try to connect to the gpg-agent.

In the future, we will probably use pygpgme for a more accurate way of
controlling gpg.

This bug can stay open until then, I guess.

John
=:->