Subject: Re: [ANNOUNCE] Git v2.2.0

From: Jeff King <[email-masked]>
Date: Thu, 27 Nov 2014 23:46:56 -0500

[nit: when quoting in your replies, please trim quotes to a reasonable
 length]

On Thu, Nov 27, 2014 at 01:32:24PM -0800, Steven Noonan wrote:

> I'm sad to report that I'm getting test failures with this release.
> Built from git and did 'make -C t prove NO_SVN_TESTS=1' and got this
> result:
> [...]
> I suspect that gnupg v2.1 is to blame somehow (I've had similar bad behavior
> with my own projects using GPG in automation). Running through several of the
> git tests shows that gpg is failing to sign:

I can reproduce here on Debian by installing gnupg2 v2.1 from
experimental (this gets installed as /usr/bin/gpg2, so I had to tweak
the code to use "gpg2" by default). In my case, gpg2 repeatedly contacts
the gpg-agent and pops up X dialogs asking to unlock keyrings in the
test suite. Hitting "cancel" causes the tests to fail. Clicking "OK"
with an empty passphrase lets the test pass.

The good news is that it is similarly broken on git v2.1.0. So this
isn't something we broke; it's the new version of gnupg2.

It's not clear to me whether this is a regression in gnupg, or if
there's some magic configuration setting we need to get the old
behavior. It seems like the new version is more aggressive in trying to
use the agent to get a passphrase, even though the keyrings in the test
are unencrypted, and do not need any passphrase. Which sounds like a bug
to me.

You might have some luck talking with the gnupg folks about this
possible bug. As a simple reproduction, doing:

  cd git/t/lib-gpg
  export GNUPGHOME=$PWD
  echo foo | gpg --sign -a

works fine with gnupg1, or earlier versions of gnupg2. But with gnupg
2.1, it causes the agent to pop up a passphrase dialog.

-Peff