Skip to contentSkip to conversation

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

DISCUSSION Gary Yang 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore

Gary Yang

author
#1 lore raw
In reply to a message not in the archive

FYI,

Pete helped me solved the problem. Somehow I got two gpg keys. Pete discovered that and suggested me the proper command to tag the code. I am going to figure out how to remove the extra key. Many thanks to Pete.

git tag -u 'For git' -s some-tag

Sincerely,

Gary

Quoted 156 lines · Pete Harlan

From: Pete Harlan <[email protected]>
Subject: Re: "secret key not available". "unable to sign the tag".
To: [email protected]
Date: Tuesday, November 18, 2008, 5:44 PM
Hi Gary,

No output doesn't mean anything is wrong, just that my suggestion wasn't
useful.

I saw from your other post that you use C-shell. I tried things here
using C-shell and it all worked as expected.

One odd-looking thing is that when you show it working from the
command-line it says:

Quoted 1 line
Quoted 1 line
Quoted 1 line

You need a passphrase to unlock the secret

key for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

user: "Gary Yang (For git.)
<[email protected]>"

whereas when you show it not working within Git it says:

Quoted 4 lines

gpg: skipped `Gary Yang
<[email protected]>': secret key not
available
gpg: signing failed: secret key not available

which leads me to believe that you have two similarly-named keys, and
that the command-line gpg is finding the one that has "For git" in the
name, but git is finding the one that doesn't, and this second one
doesn't have a secret key available.

If you try specifying the first key to git:

git tag -u 'For git' -s some-tag

does that work?

--Pete

Quoted 3 lines · Gary Yang

Hi Pete,

I got no output of the commands you told me. That

means I have no environment setup. Can you please tell me what kind of environment variables need to setup? Thank you very much!

Quoted 9 lines
Quoted 4 lines
env | grep -i gnupg
env | grep -i gpg
env | grep -i pgp

Gary

--- On Tue, 11/18/08, Pete Harlan

Quoted 3 lines · <[email protected]> wrote:
Quoted 3 lines

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

"unable to sign the tag".

Quoted 9 lines
Quoted 9 lines

To: [email protected]
Date: Tuesday, November 18, 2008, 5:16 PM

Quoted 3 lines · Gary Yang

Hi Pete,

What I should export? Do you have any idea?

Hi Gary,

I'd look for anything that says gnupg or gpg

in the

Quoted 7 lines
Quoted 7 lines

environment.

env | grep -i gnupg
env | grep -i gpg
env | grep -i pgp

I'm afriad it's not much of an idea. If

the above

Quoted 13 lines
Quoted 13 lines

don't match
anything, I don't know what to suggest.

Good luck,

--Pete

Quoted 4 lines

Thank you,

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

Gary

--- On Tue, 11/18/08, Pete Harlan

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

From: Pete Harlan

<[email protected]>

Quoted 4 lines
Quoted 4 lines

Subject: Re: "secret key not

Quoted 1 line
Quoted 1 line

available". "unable to sign the

tag". To: [email protected] Date:

Quoted 1 line
Quoted 1 line

Tuesday, November 18, 2008, 2:18 PM Gary

Yang

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines

Peter,

The gpg works. But, git tag dose not

work. Any

Quoted 2 lines
Quoted 2 lines

idea?

Quoted 1 line
Quoted 1 line

Could gpg be using something from your

environment

Quoted 7 lines
Quoted 7 lines

that you're not

Quoted 6 lines
Quoted 6 lines

exporting, so git can't see it?

--Pete

Quoted 1 line

gpg --detach-sign foo.bar gpg:

WARNING: using

Quoted 2 lines
Quoted 2 lines

insecure memory!

Quoted 1 line
Quoted 1 line
Quoted 1 line

gpg: please see

http://www.gnupg.org/faq.html

Quoted 3 lines
Quoted 3 lines

for more

Quoted 2 lines
Quoted 2 lines

information

Quoted 1 line

You need a passphrase to unlock the

secret key

Quoted 9 lines
Quoted 9 lines

for user: "Gary

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Yang (For git.)

<[email protected]>"

Quoted 1 line

1024-bit DSA key, ID A3F6A45E, created

2008-11-14

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Enter passphrase:

[garyyang6@svdclc313

~/git-repository]%

Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

It successfully signed.

Gary