git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problem signing a tag

From
Joshua J. Kugler <joshua@eeinternet.com>
Date
Nov 5, 2009, 08:37 UTC
Message-ID
<200911042337.26820.joshua@eeinternet.com>
In-Reply-To
<4AF28CE4.5000906@drmicha.warpmail.net>
On Wednesday 04 November 2009, Michael J Gruber said something like:
Show 27 quoted lines
> > So, the docs consider 2 a fatal error, even though it appears it
> > isn't. It seems that
> > http://github.com/git/git/blob/a6dbf8814f433a7fbfa9cde6333c98019f6d
> >b1e4/builtin-tag.c#L202 needs to be patched to something along the
> > lines of:
> >
> > rv = finish_command(&gpg)
> > if ((rv && rv !=2)  || !len || len < 0)
> >
> > Probably digging in to the gpg source code to figure out what
> > errors are and aren't fatal would be in order.
> >
> > Thanks again for your help! Glad to know what I needed to do to
> > sign my tags!
>
> 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 ;)
>
> Michael
That is weird.  Because when working from the prompt (with agent MIA), 
gpg 1.4.9, it would accept my pass phrase, and would print the 
signature (either binary or ascii armored), but it will still exit with 
2.  I don't understand it.  I'll pop on #gnupg tomorrow and ask about 
it.
Thanks again for your help with this!
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0x14EA086E
Previous: Michael J GruberNext: Junio C Hamano
Message 7 of 10 in “Problem signing a tag”
  1. Joshua J. KuglerNov 3, 2009
  2. Alex RiesenNov 3, 2009
  3. Joshua J. KuglerNov 3, 2009
  4. Michael J GruberNov 4, 2009
  5. Joshua J. KuglerNov 4, 2009
  6. Michael J GruberNov 5, 2009
  7. Joshua J. KuglerNov 5, 2009
  8. Junio C HamanoNov 5, 2009
  9. Michael J GruberNov 6, 2009
  10. Joshua J. KuglerNov 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.