Skip to contentSkip to conversation

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

DISCUSSION Gary Yang 4 participants 13 messages Jun 15, 2016

lore
Share & tools
lore

Gary Yang

author
#0 lore raw

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

#1 lore raw
Quoted 2 lines · Gary Yang

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.

Quoted 8 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 [email protected]

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

-Peff

#2 lore raw
Quoted 8 lines · Jeff King

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 [email protected]

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

author
#3 lore raw

Hi Linus,

I do not understand your email. I used the command, git config --global user.email [email protected]. But, I still got the same error. Do you have any idea?

Thank you,

Gary

Quoted 38 lines · Linus Torvalds

From: Linus Torvalds <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Jeff King" <[email protected]>
Cc: "Gary Yang" <[email protected]>, [email protected]
Date: Sunday, November 16, 2008, 4:16 PM

Quoted 2 lines · Jeff King

You need to tell git who you are, since it is unable

to deduce it from

Quoted 5 lines

doing host lookups. Try:

  git config --global user.email [email protected]

or whatever email address you used when you created

the key, and then

Quoted 1 line

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

author
#4 lore raw
In reply to Linus Torvalds

Hi Jeff,

I do not understand your email. I used the command, git config --global user.email [email protected]

But, I still got the same error. Do you have any idea?

Thanks,

Perry

Quoted 38 lines · Linus Torvalds

From: Linus Torvalds <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Jeff King" <[email protected]>
Cc: "Gary Yang" <[email protected]>, [email protected]
Date: Sunday, November 16, 2008, 4:16 PM

Quoted 2 lines · Jeff King

You need to tell git who you are, since it is unable

to deduce it from

Quoted 5 lines

doing host lookups. Try:

  git config --global user.email [email protected]

or whatever email address you used when you created

the key, and then

Quoted 1 line

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

author
#5 lore raw
In reply to Jeff King

Jeff King,

I followed your instruction. But, I still got error when I tag the code. Can you please tell me why?

Quoted 1 line
  git config --global user.email [email protected]

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 <[email protected]>': 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

Quoted 48 lines · Jeff King

From: Jeff King <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Gary Yang" <[email protected]>
Cc: [email protected]
Date: Friday, November 14, 2008, 7:57 PM

Quoted 1 line · Gary Yang

I got errors and warnings when I used "git tag -s

my-tag". It says,

Quoted 1 line

"secret key not available". "unable to

sign the tag".

Probably because it can't find your secret key, like it says.

Quoted 1 line

gpg: please see http://www.gnupg.org/faq.html for more

information

Quoted 1 line

gpg: skipped `Gary Yang

<gyang@linux123.(none)>': secret key not available

Quoted 5 lines

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

Quoted 1 line

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 [email protected]

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 [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 5 lines · Gary Yang

gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: skipped `Gary Yang <[email protected]>': 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

author
#7 lore raw

All,

I really need to tag my source code. But, somehow I am not able. Can someone help?

Thanks in advance!

Gary

Quoted 68 lines · Gary Yang

From: Gary Yang <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Jeff King" <[email protected]>, "Linus Torvalds" <[email protected]>
Cc: [email protected]
Date: Tuesday, November 18, 2008, 8:57 AM
Hi Linus,

I do not understand your email. I used the command, git config --global user.email [email protected]. But, I still got the same error. Do you have any idea?

Thank you,

Gary

--- On Sun, 11/16/08, Linus Torvalds

Quoted 1 line · <[email protected]> wrote:

From: Linus Torvalds

<[email protected]>

Quoted 1 line

Subject: Re: "secret key not available".

"unable to sign the tag".

Quoted 2 lines

To: "Jeff King" <[email protected]>
Cc: "Gary Yang" <[email protected]>,

[email protected]

Quoted 4 lines

Date: Sunday, November 16, 2008, 4:16 PM

Quoted 2 lines · Jeff King

You need to tell git who you are, since it is

unable

Quoted 4 lines

to deduce it from

Quoted 3 lines

doing host lookups. Try:

  git config --global user.email

[email protected]

Quoted 2 lines
Quoted 2 lines

or whatever email address you used when you

created

Quoted 4 lines

the key, and then

Quoted 1 line

gpg should find it appropriately.

Side note: sometimes you might want to use a different

key

Quoted 11 lines

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

Quoted 2 lines

different
projects, even if you want to be known under the same

name

Quoted 2 lines

in both. Or
because you want to have the local hostname in your

commit

Quoted 5 lines

logs, but your
gpg key is using some externally visible
"official" email address.

Linus

author
#8 lore raw

Here are the errors I got:

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 <[email protected]>': 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

Quoted 110 lines · Gary Yang

From: Gary Yang <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Jeff King" <[email protected]>, "Linus Torvalds" <[email protected]>
Cc: [email protected]
Date: Tuesday, November 18, 2008, 12:22 PM
All,

I really need to tag my source code. But, somehow I am not able. Can someone help?

Thanks in advance!

Gary

--- On Tue, 11/18/08, Gary Yang <[email protected]>

Quoted 2 lines · wrote:

From: Gary Yang <[email protected]>
Subject: Re: "secret key not available".

"unable to sign the tag".

Quoted 1 line

To: "Jeff King" <[email protected]>,

"Linus Torvalds"
<[email protected]>

Quoted 5 lines

Cc: [email protected]
Date: Tuesday, November 18, 2008, 8:57 AM
Hi Linus,

I do not understand your email. I used the command,

git

Quoted 1 line

config --global user.email [email protected]. But, I

still

Quoted 5 lines

got the same error. Do you have any idea?

Thank you,

Quoted 9 lines

Gary

--- On Sun, 11/16/08, Linus Torvalds

Quoted 1 line · <[email protected]> wrote:

From: Linus Torvalds

<[email protected]>

Quoted 1 line

Subject: Re: "secret key not

available".

Quoted 3 lines

"unable to sign the tag".

Quoted 2 lines

To: "Jeff King" <[email protected]>
Cc: "Gary Yang"

<[email protected]>,

Quoted 5 lines

[email protected]

Quoted 4 lines

Date: Sunday, November 16, 2008, 4:16 PM

Quoted 2 lines · Jeff King

You need to tell git who you are, since it

is

Quoted 13 lines

unable

Quoted 4 lines

to deduce it from

Quoted 3 lines

doing host lookups. Try:

  git config --global user.email

[email protected]

Quoted 2 lines
Quoted 2 lines

or whatever email address you used when you

created

Quoted 4 lines

the key, and then

Quoted 1 line

gpg should find it appropriately.

Side note: sometimes you might want to use a

different

Quoted 8 lines

key

Quoted 7 lines

than the one
you use for authorship. Then you can use

	[user]
		SigningKey = key

(or "git config user.signingkey xyz" if

you

Quoted 4 lines
Quoted 4 lines

don't want to edit the
config file manually).

This can be especially useful if you use

different

Quoted 3 lines

keys for

Quoted 2 lines

different
projects, even if you want to be known under the

same

Quoted 3 lines

name

Quoted 2 lines

in both. Or
because you want to have the local hostname in

your

Quoted 6 lines

commit

Quoted 5 lines

logs, but your
gpg key is using some externally visible
"official" email address.

Linus

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

author
#9 lore raw

The gpg works. But, git tag dose not work. Any idea?

gpg --detach-sign foo.bar
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information

You need a passphrase to unlock the secret key for
user: "Gary Yang (For git.) <[email protected]>" 1024-bit DSA key, ID A3F6A45E, created 2008-11-14 Enter passphrase:
[garyyang6@svdclc313 ~/git-repository]%

It successfully signed.

Gary

Quoted 163 lines · Gary Yang

From: Gary Yang <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Jeff King" <[email protected]>, "Linus Torvalds" <[email protected]>
Cc: [email protected]
Date: Tuesday, November 18, 2008, 12:26 PM
Here are the errors I got:

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 <[email protected]>':
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 Tue, 11/18/08, Gary Yang <[email protected]>

Quoted 2 lines · wrote:

From: Gary Yang <[email protected]>
Subject: Re: "secret key not available".

"unable to sign the tag".

Quoted 1 line

To: "Jeff King" <[email protected]>,

"Linus Torvalds"
<[email protected]>

Quoted 5 lines

Cc: [email protected]
Date: Tuesday, November 18, 2008, 12:22 PM
All,

I really need to tag my source code. But, somehow I am

not

Quoted 10 lines

able. Can someone help?

Thanks in advance!

Gary

--- On Tue, 11/18/08, Gary Yang

<[email protected]>

Quoted 4 lines
Quoted 2 lines · wrote:

From: Gary Yang <[email protected]>
Subject: Re: "secret key not

available".

Quoted 9 lines

"unable to sign the tag".

Quoted 1 line

To: "Jeff King" <[email protected]>,

"Linus Torvalds"
<[email protected]>

Quoted 5 lines

Cc: [email protected]
Date: Tuesday, November 18, 2008, 8:57 AM
Hi Linus,

I do not understand your email. I used the

command,

Quoted 2 lines

git

Quoted 1 line

config --global user.email [email protected].

But, I

Quoted 9 lines

still

Quoted 8 lines

got the same error. Do you have any idea?

Thank you,

Gary

Quoted 9 lines
Quoted 6 lines

--- On Sun, 11/16/08, Linus Torvalds

Quoted 1 line · <[email protected]> wrote:

From: Linus Torvalds

<[email protected]>

Quoted 1 line

Subject: Re: "secret key not

available".

Quoted 2 lines

"unable to sign the tag".

Quoted 1 line

To: "Jeff King"

<[email protected]>

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Cc "Gary Yang"

<[email protected]>,

Quoted 5 lines

[email protected]

Quoted 4 lines

Date: Sunday, November 16, 2008, 4:16 PM

Quoted 2 lines · Jeff King

You need to tell git who you are, since

it

Quoted 9 lines

is

Quoted 8 lines

unable

Quoted 4 lines

to deduce it from

Quoted 3 lines

doing host lookups. Try:

  git config --global user.email

[email protected]

Quoted 2 lines
Quoted 2 lines

or whatever email address you used when

you

Quoted 14 lines
Quoted 5 lines

created

Quoted 4 lines

the key, and then

Quoted 1 line

gpg should find it appropriately.

Side note: sometimes you might want to use a

different

Quoted 8 lines

key

Quoted 7 lines

than the one
you use for authorship. Then you can use

	[user]
		SigningKey = key

(or "git config user.signingkey

xyz" if

Quoted 9 lines

you

Quoted 4 lines
Quoted 4 lines

don't want to edit the
config file manually).

This can be especially useful if you use

different

Quoted 3 lines

keys for

Quoted 2 lines

different
projects, even if you want to be known under

the

Quoted 4 lines

same

Quoted 3 lines

name

Quoted 2 lines

in both. Or
because you want to have the local hostname

in

Quoted 10 lines

your

Quoted 6 lines

commit

Quoted 5 lines

logs, but your
gpg key is using some externally visible
"official" email address.

Linus

Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

#10 lore raw
Quoted 2 lines · Gary Yang

The gpg works. But, git tag dose not work. Any idea?

Does

git tag -u [email protected] tag-name

work (ie when you use an explicitly given key to tag with)?

And if not, please do list the output of "gpg -K" if that doesn't work.

Linus

author
#11 lore raw

The command, "git tag -u [email protected] tag-name" works! Thank you! Below is the output of "gpg -k". I have no idea why I have three keys.

gpg -k
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information /home/garyyang6/.gnupg/pubring.gpg
----------------------------------
pub 1024D/A3F6A45E 2008-11-14 Gary Yang (For git.) <[email protected]> sub 1024g/58AE6B3C 2008-11-14

pub 1024D/EE763A89 2008-11-14 Gary Yang (PGP for git.) <[email protected]> sub 1024g/AECCA323 2008-11-14

pub 1024D/5015631E 2008-11-18 Gary Yang (For git) <[email protected]>

Quoted 25 lines · Linus Torvalds

From: Linus Torvalds <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: "Gary Yang" <[email protected]>
Cc: "Jeff King" <[email protected]>, "Git Mailing List" <[email protected]>
Date: Wednesday, November 19, 2008, 7:42 AM

Quoted 2 lines · Gary Yang

The gpg works. But, git tag dose not work. Any idea?

Does

git tag -u [email protected] tag-name

work (ie when you use an explicitly given key to tag with)?

And if not, please do list the output of "gpg -K"
if that doesn't work.

Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

#12 lore raw

I had the same problem. Turned out that the user.name must also match the one in the gpg! Hope this helps!

Signature · 2 lines
View this message in context: http://n2.nabble.com/secret-key-not-available-unable-to-sign-the-tag-tp1500685p4512970.html
Sent from the git mailing list archive at Nabble.com.