threads / discuss / 16336

"secret key not available". "unable to sign the tag".

Subject: "secret key not available". "unable to sign the tag".

## tl;dr

7 messages between Nov 14, 2008 and Nov 18, 2008.

replies: 6people: 3as markdown or json

Gary Yang· Nov 14, 2008, 23:28 UTC · lore
Hi,
I got errors and warnings when I used "git tag -s my-tag". It says, "secret key not available". "unable to sign the tag". 

gpg: please see http://www.gnupg.org/faq.html for more information gpg: skipped `Gary Yang <gyang@linux123.(none)>': secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the tag fatal: unable to sign the tag

I ran "gpg --gen-key" and generated keypair. But, still got the same error. Please help.
Thank,
Gary
      
Jeff King· Nov 15, 2008, 03:57 UTC · re: Gary Yang · lore

Re: "secret key not available". "unable to sign the tag".

On Fri, Nov 14, 2008 at 03:28:44PM -0800, Gary Yang wrote:
> I got errors and warnings when I used "git tag -s my-tag". It says,
> "secret key not available". "unable to sign the tag". 
Probably because it can't find your secret key, like it says.
Show 8 quoted lines
> gpg: please see http://www.gnupg.org/faq.html for more information
> gpg: skipped `Gary Yang <gyang@linux123.(none)>': secret key not available
> gpg: signing failed: secret key not available
> error: gpg failed to sign the tag
> fatal: unable to sign the tag
> 
> I ran "gpg --gen-key" and generated keypair. But, still got the same
> error. Please help.

Did the key you generated have the email address "gyang@linux123.(none)"? If not, then that is your problem.

You need to tell git who you are, since it is unable to deduce it from doing host lookups. Try:

  git config --global user.email garyyang6@yahoo.com

or whatever email address you used when you created the key, and then gpg should find it appropriately.

-Peff
Linus Torvalds· Nov 17, 2008, 00:16 UTC · re: Jeff King · lore

Re: "secret key not available". "unable to sign the tag".

On Fri, 14 Nov 2008, Jeff King wrote:
Show 8 quoted lines
> 
> You need to tell git who you are, since it is unable to deduce it from
> doing host lookups. Try:
> 
>   git config --global user.email garyyang6@yahoo.com
> 
> or whatever email address you used when you created the key, and then
> gpg should find it appropriately.

Side note: sometimes you might want to use a different key than the one you use for authorship. Then you can use

	[user]
		SigningKey = key

(or "git config user.signingkey xyz" if you don't want to edit the config file manually).

This can be especially useful if you use different keys for different projects, even if you want to be known under the same name in both. Or because you want to have the local hostname in your commit logs, but your gpg key is using some externally visible "official" email address.

			Linus
Gary Yang· Nov 18, 2008, 16:55 UTC · re: Linus Torvalds · lore

Re: "secret key not available". "unable to sign the tag".

Hi Jeff,

I do not understand your email. I used the command, git config --global user.email garyyang6@yahoo.com

But, I still got the same error. Do you have any idea?
Thanks,
Perry
--- On Sun, 11/16/08, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 38 quoted lines
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: "Jeff King" <peff@peff.net>
> Cc: "Gary Yang" <garyyang6@yahoo.com>, git@vger.kernel.org
> Date: Sunday, November 16, 2008, 4:16 PM
> On Fri, 14 Nov 2008, Jeff King wrote:
> > 
> > You need to tell git who you are, since it is unable
> to deduce it from
> > doing host lookups. Try:
> > 
> >   git config --global user.email garyyang6@yahoo.com
> > 
> > or whatever email address you used when you created
> the key, and then
> > gpg should find it appropriately.
> 
> Side note: sometimes you might want to use a different key
> than the one 
> you use for authorship. Then you can use
> 
> 	[user]
> 		SigningKey = key
> 
> (or "git config user.signingkey xyz" if you
> don't want to edit the 
> config file manually). 
> 
> This can be especially useful if you use different keys for
> different 
> projects, even if you want to be known under the same name
> in both. Or 
> because you want to have the local hostname in your commit
> logs, but your 
> gpg key is using some externally visible
> "official" email address.
> 
> 			Linus
Gary Yang· Nov 18, 2008, 16:57 UTC · re: Linus Torvalds · lore

Re: "secret key not available". "unable to sign the tag".

Hi Linus,
I do not understand your email. I used the command, git config --global user.email garyyang6@yahoo.com. But, I still got the same error. Do you have any idea?
Thank you,
Gary
--- On Sun, 11/16/08, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 38 quoted lines
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: "Jeff King" <peff@peff.net>
> Cc: "Gary Yang" <garyyang6@yahoo.com>, git@vger.kernel.org
> Date: Sunday, November 16, 2008, 4:16 PM
> On Fri, 14 Nov 2008, Jeff King wrote:
> > 
> > You need to tell git who you are, since it is unable
> to deduce it from
> > doing host lookups. Try:
> > 
> >   git config --global user.email garyyang6@yahoo.com
> > 
> > or whatever email address you used when you created
> the key, and then
> > gpg should find it appropriately.
> 
> Side note: sometimes you might want to use a different key
> than the one 
> you use for authorship. Then you can use
> 
> 	[user]
> 		SigningKey = key
> 
> (or "git config user.signingkey xyz" if you
> don't want to edit the 
> config file manually). 
> 
> This can be especially useful if you use different keys for
> different 
> projects, even if you want to be known under the same name
> in both. Or 
> because you want to have the local hostname in your commit
> logs, but your 
> gpg key is using some externally visible
> "official" email address.
> 
> 			Linus
Gary Yang· Nov 18, 2008, 01:59 UTC · re: Jeff King · lore

Re: "secret key not available". "unable to sign the tag".

Jeff King,
I followed your instruction. But, I still got error when I tag the code. Can you please tell me why?
>   git config --global user.email garyyang6@yahoo.com
git tag -s my-second-tag

gpg: WARNING: using insecure memory! gpg: please see http://www.gnupg.org/faq.html for more information gpg: skipped `Gary Yang <garyyang6@yahoo.com>': secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the tag fatal: unable to sign the tag

Thanks,
Gary
--- On Fri, 11/14/08, Jeff King <peff@peff.net> wrote:
Show 48 quoted lines
> From: Jeff King <peff@peff.net>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Friday, November 14, 2008, 7:57 PM
> On Fri, Nov 14, 2008 at 03:28:44PM -0800, Gary Yang wrote:
> 
> > I got errors and warnings when I used "git tag -s
> my-tag". It says,
> > "secret key not available". "unable to
> sign the tag". 
> 
> Probably because it can't find your secret key, like it
> says.
> 
> > gpg: please see http://www.gnupg.org/faq.html for more
> information
> > gpg: skipped `Gary Yang
> <gyang@linux123.(none)>': secret key not available
> > gpg: signing failed: secret key not available
> > error: gpg failed to sign the tag
> > fatal: unable to sign the tag
> > 
> > I ran "gpg --gen-key" and generated keypair.
> But, still got the same
> > error. Please help.
> 
> Did the key you generated have the email address
> "gyang@linux123.(none)"? If not, then that is
> your problem.
> 
> You need to tell git who you are, since it is unable to
> deduce it from
> doing host lookups. Try:
> 
>   git config --global user.email garyyang6@yahoo.com
> 
> or whatever email address you used when you created the
> key, and then
> gpg should find it appropriately.
> 
> -Peff
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
Linus Torvalds· Nov 18, 2008, 04:21 UTC · re: Gary Yang · lore

Re: "secret key not available". "unable to sign the tag".

On Mon, 17 Nov 2008, Gary Yang wrote:
Show 5 quoted lines
> 
> gpg: WARNING: using insecure memory!
> gpg: please see http://www.gnupg.org/faq.html for more information
> gpg: skipped `Gary Yang <garyyang6@yahoo.com>': secret key not available
> gpg: signing failed: secret key not available
What does
	gpg --list-secret-keys
say? Have you actually set up a key for that email address?
		Linus

← back to recent threads