Yubico Forum
https://forum.yubico.com/

Git bash could not find gpg key
https://forum.yubico.com/viewtopic.php?f=26&t=2301
Page 1 of 1

Author:  vijai [ Thu May 05, 2016 5:35 am ]
Post subject:  Git bash could not find gpg key

Hello,
Received my yubikey neo yesterday and I added a gpg key to my neo and I did
Code:
gpg --card-status
in cmd and the output is
Quote:
C:\Users\vijai>gpg --card-status
Application ID ...: D276000124045656412487560455564546546
Version ..........: 2.0
Manufacturer .....: Yubico
Serial number ....: 01234567
Name of cardholder: Ramprasad Vijai Chandra Prasad
Language prefs ...: en
Sex ..............: male
URL of public key : https://drive.google.com/open?id=0B9432 ... XXXXXXXXXX
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: 2048R 2048R 2048R
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 3 3
Signature counter : 0
Signature key ....: 84DA 6E98 E455 54B4 EA76 0801 0237 8ESD E5B6 7F56
created ....: 2016-05-04 12:05:47
Encryption key....: 5DCD B840 2DB1 A39D 4639 1EC5 4E0D 45CXS 0408 068A
created ....: 2016-05-04 12:05:47
Authentication key: AE64 D114 55C3 A22B 874E 5AAX 8102 0FDA DCC6 8486
created ....: 2016-05-04 12:07:07
General key info..: pub 2048R/E5B67F56 2016-05-04 vijai1996 (githubkey) <vxxxxxx0@gmail.com>
sec> 2048R/E5B67F56 created: 2016-05-04 expires: never
card-no: 0006 01234567
ssb> 2048R/0408068A created: 2016-05-04 expires: never
card-no: 0006 01234567
ssb> 2048R/DCC68486 created: 2016-05-04 expires: never
card-no: 0006 01234567

And also kleopatra shows the key correctly. But when I try to commit using git bash, I get
Quote:
$ git commit -S -m "Initial commit"
gpg: skipped "E5B67F56": secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
fatal: failed to write commit object

So I tried
Code:
gpg --card-status
I get
Quote:
gpg: detected reader `Yubico Yubikey NEO OTP+CCID 0'
gpg: pcsc_transmit failed: invalid parameter (0x80100004)
gpg: apdu_send_simple(0) failed: invalid value
Please insert the card and hit return or enter 'c' to cancel:

I tried googling but without any progress. Can somebody point me in right direction?

Regards,
Vijai

Author:  ChrisHalos [ Fri May 06, 2016 1:26 am ]
Post subject:  Re: Git bash could not find gpg key

I've only seen 0x80100004 when the applet is locked out. Did you do anything between your earlier attempt at "gpg --casrd-status", which was successful, and the later failed attempt? You can also try terminating the GnuPG processes in Task Manager and running "gpg --card-status" again.

Author:  vijai [ Fri May 06, 2016 5:00 am ]
Post subject:  Re: Git bash could not find gpg key

ChrisHalos wrote:
I've only seen 0x80100004 when the applet is locked out. Did you do anything between your earlier attempt at "gpg --casrd-status", which was successful, and the later failed attempt? You can also try terminating the GnuPG processes in Task Manager and running "gpg --card-status" again.

Thanks for the reply. No. Nothing was run after --card-status. I ran card-status in windows cmd and when it was successful, tried it on git bash and that error popped up. I checked now and no process named "GnuPG" was running. Tried in bash then but the same error.

Regards,
Vijai

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/