On Friday 06 November 2009, Michael J Gruber said something like: > Junio C Hamano venit, vidit, dixit 05.11.2009 21:09: > > Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes: > >> Dig dig dig... gpg exits with 2 in a lot of cases, one would need > >> to parse fd-error to find out more. But it also looks as if gpg > >> exits normally with a good passphrase. So I tried, and at least > >> with gpg 1.4.9 and git 1.6.5.2 I can sign tags with "use-agent" > >> and without a running agent: I get asked for the passphrase (after > >> reporting the agent MIA), and everything's fine. > >> > >> My gpg returns 0 in this case; it returns 2 only if I don't enter > >> the passphrase. So, this seems to depend on the version of gpg. Or > >> on entering the correct passphrase ;) > > > > If the problematic gpg that gives 2 is older than yours, the > > situation looks to me that "exiting 2 when failed to contact agent > > but got a good passphrase some other way and successfully signed" > > was diagnosed as a bug and then fixed in gpg. If that is the case > > can we find out which version that fix is in, and add an entry to > > FAQ to help next person who will be hit by this when using "tag > > -s"? > > Both of us seem to be using gpg 1.4.9, which is weird. I even checked > Fedora's srpm, they don't apply any patches for this. For the record, > I'm doing > > unset GPG_AGENT_INFO > echo a |gpg -bsa > > with "use-agent" and a default key signing specified in my gpg conf. > This returns "0" if I enter the correct passphrase (after being > warned about the missing agent) and "2" if I enter a wrong one > repeatedly. Joshua, your reports seem to confirm that you get 2 in > both cases from your gpg 1.4.9, right? I discovered that there must have been something locked up or wedged. I rebooted (kernel update), and it worked. I looked at the warning again, and realized that the warning I got when the exit value was 2 was: gpg: problem with the agent - disabling agent use while the warning I got when the exit value was 0 was: gpg: gpg-agent is not available in this session So, two different warnings. Thanks again for all the troubleshooting help! j -- Joshua Kugler Part-Time System Admin/Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0x14EA086E -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html