All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joshua J. Kugler" <joshua@eeinternet.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: Problem signing a tag
Date: Wed, 04 Nov 2009 10:47:49 -0800	[thread overview]
Message-ID: <200911040947.50226.joshua@eeinternet.com> (raw)
In-Reply-To: <4AF18F7A.2000904@drmicha.warpmail.net>

On Wednesday 04 November 2009, Michael J Gruber said something like:
> > gpg: problem with the agent - disabling agent use
> > error: gpg failed to sign the tag
> > error: unable to sign the tag
> > $ echo $?
> > 128
> >
> > And when I sign at the prompt:
> >
> > $ gpg -sa
> >
> > You need a passphrase to unlock the secret key for
> > user: "Joshua J. Kugler <joshua@azariah.com>"
> > 1024-bit DSA key, ID 14EA086E, created 2009-08-09
> >
> > gpg: problem with the agent - disabling agent use
> > Blah blah blah blah
> > Blah blah blah blah
> > $ echo $?
> > 2
>
> [...]
>
> I assume you don't want to use gpg-agent, that should be the easy way
> out.

Well, I could, but I just haven't set it up. :)

> If that helps you can put "--no-use-agent" in your gpg config.

I commented out use-agent in the config. That worked. THANKS!

> 2 is a non-fatal error, 128 a fatal one, btw.

Well, the 2 was from running gpg alone, and 128 was from git erroring 
out.  According to the gpg docs:

"The program returns 0 if everything was fine, 1 if at least a signature 
was bad, and other error codes for fatal errors."

So, the docs consider 2 a fatal error, even though it appears it isn't.  
It seems that 
http://github.com/git/git/blob/a6dbf8814f433a7fbfa9cde6333c98019f6db1e4/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!

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0x14EA086E

  reply	other threads:[~2009-11-04 18:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03  0:58 Problem signing a tag Joshua J. Kugler
2009-11-03  7:31 ` Alex Riesen
2009-11-03 18:11   ` Joshua J. Kugler
2009-11-04 14:28     ` Michael J Gruber
2009-11-04 18:47       ` Joshua J. Kugler [this message]
2009-11-05  8:29         ` Michael J Gruber
2009-11-05  8:37           ` Joshua J. Kugler
2009-11-05 20:09           ` Junio C Hamano
2009-11-06  9:54             ` Michael J Gruber
2009-11-09 20:15               ` Joshua J. Kugler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200911040947.50226.joshua@eeinternet.com \
    --to=joshua@eeinternet.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.