Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Gary Yang <hidden>
Date: 2016-06-15 22:45:40

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


--- On Tue, 11/18/08, Pete Harlan <pgit@pcharlan.com> wrote:
From: Pete Harlan <redacted>
Subject: Re: "secret key not available". "unable to sign the tag".
To: garyyang6@yahoo.com
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
quoted
quoted
You need a passphrase to unlock the secret
key for
quoted
quoted
quoted
user: "Gary Yang (For git.)
[off-list ref]"
whereas when you show it not working within Git it says:
quoted
gpg: skipped `Gary Yang
[off-list ref]': 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


Gary Yang wrote:
quoted
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
quoted
env | grep -i gnupg
env | grep -i gpg
env | grep -i pgp

Gary
--- On Tue, 11/18/08, Pete Harlan
[off-list ref] wrote:
quoted
quoted
From: Pete Harlan <redacted>
Subject: Re: "secret key not available".
"unable to sign the tag".
quoted
quoted
To: garyyang6@yahoo.com
Date: Tuesday, November 18, 2008, 5:16 PM
Gary Yang wrote:
quoted
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
quoted
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
quoted
don't match
anything, I don't know what to suggest.

Good luck,

--Pete


quoted
Thank you,


Gary



--- On Tue, 11/18/08, Pete Harlan
[off-list ref] wrote:
quoted
quoted
From: Pete Harlan
[off-list ref]
quoted
quoted
Subject: Re: "secret key not
quoted
quoted
available". "unable to sign the
tag". To: garyyang6@yahoo.com Date:
quoted
quoted
Tuesday, November 18, 2008, 2:18 PM Gary
Yang
quoted
quoted
wrote:
quoted
quoted
quoted
Peter,

The gpg works. But, git tag dose not
work. Any
quoted
quoted
idea?
quoted
quoted
Could gpg be using something from your
environment
quoted
quoted
that you're not 
quoted
quoted
exporting, so git can't see it?

--Pete

quoted
gpg --detach-sign foo.bar gpg:
WARNING: using
quoted
quoted
insecure memory! 
quoted
quoted
quoted
gpg: please see
http://www.gnupg.org/faq.html
quoted
quoted
for more
quoted
quoted
information
quoted
You need a passphrase to unlock the
secret key
quoted
quoted
for user: "Gary
quoted
quoted
quoted
Yang (For git.)
[off-list ref]"
quoted
1024-bit DSA key, ID A3F6A45E, created
2008-11-14
quoted
quoted
quoted
Enter passphrase:


[garyyang6@svdclc313
~/git-repository]%
quoted
quoted
quoted
quoted
quoted

It successfully signed.


Gary

      
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help