Problem signing git commits with smartcard key

kookie at spacekookie.de kookie at spacekookie.de
Thu May 31 16:12:56 CEST 2018


Hey there,

I have a yubikey 4 that contains my GPG key. I can use the `gpg2` tool to sign messages without problems. But when I try to do the same with git, it fails. The command that git runs internally is equivalent to this:

echo "This is a stream from git..." | gpg2 --status-fd=2 -bsau 555F2E4B6F87F91A4110669E90734A9E619C8A6C

Which outputs the following error:

[GNUPG:] KEY_CONSIDERED 555F2E4B6F87F91A4110669E90734A9E619C8A6C 0
[GNUPG:] BEGIN_SIGNING H8
gpg: signing failed: Invalid ID
[GNUPG:] FAILURE sign 100663414
gpg: signing failed: Invalid ID

I can sign commits correctly with a new key I made on my computer instead of on the yubikey and I'm trying to understand why this is. Generally these error messages are very cryptic and I've had a hard time finding out things about them.

Any help would be appreciated, thank you!


--
Katharina 'spacekookie' Fey



More information about the Gnupg-users mailing list