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

7 messages from 2008-11-14 to 2008-11-18. Participants: Gary Yang, Jeff King, Linus Torvalds.
Thread: https://gitlist.dev/t/16336

## Gary Yang, 2008-11-14 23:28

Subject: "secret key not available". "unable to sign the tag".
Message-ID: <823128.71540.qm@web37902.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/823128.71540.qm%40web37902.mail.mud.yahoo.com

```
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, 2008-11-15 03:57

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <20081115035743.GA19633@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20081115035743.GA19633%40coredump.intra.peff.net
In-Reply-To: <823128.71540.qm@web37902.mail.mud.yahoo.com>

```
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

```

## Linus Torvalds, 2008-11-17 00:16

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <alpine.LFD.2.00.0811161609340.3468@nehalem.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.2.00.0811161609340.3468%40nehalem.linux-foundation.org
In-Reply-To: <20081115035743.GA19633@coredump.intra.peff.net>

```


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, 2008-11-18 01:59

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <424422.27374.qm@web37902.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/424422.27374.qm%40web37902.mail.mud.yahoo.com
In-Reply-To: <20081115035743.GA19633@coredump.intra.peff.net>

```
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:

> 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, 2008-11-18 04:21

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <alpine.LFD.2.00.0811172019080.18283@nehalem.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.2.00.0811172019080.18283%40nehalem.linux-foundation.org
In-Reply-To: <424422.27374.qm@web37902.mail.mud.yahoo.com>

```


On Mon, 17 Nov 2008, Gary Yang wrote:
> 
> 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

```

## Gary Yang, 2008-11-18 16:55

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <876653.99147.qm@web37906.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/876653.99147.qm%40web37906.mail.mud.yahoo.com
In-Reply-To: <alpine.LFD.2.00.0811161609340.3468@nehalem.linux-foundation.org>

```
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:

> 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, 2008-11-18 16:57

Subject: Re: "secret key not available". "unable to sign the tag".
Message-ID: <525043.96796.qm@web37903.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/525043.96796.qm%40web37903.mail.mud.yahoo.com
In-Reply-To: <alpine.LFD.2.00.0811161609340.3468@nehalem.linux-foundation.org>

```
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:

> 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


      

```
