Yubico Forum https://forum.yubico.com/ |
|
[solved] Yubikey 4 and git commit signing https://forum.yubico.com/viewtopic.php?f=35&t=2522 |
Page 1 of 1 |
Author: | irgendwer [ Sat Jan 14, 2017 7:03 pm ] |
Post subject: | [solved] Yubikey 4 and git commit signing |
Hi, I want to use my yubikey 4 to sign git commits. I have successfully set-up a master-key (which is completely offline) and three subkeys (one for signing, authentication and encryption each) on my yubikey. Then I configured GIT to use my signing-key and to sign every commit. However, each time I try to do so, I receive the following error message: Code: gpg: signing failed: private key is not available If I use the same command on the shell directly, everything works fine: Code: gpg -basu <keyid> the pinentry programs pops up, I can enter my pin and the signature gets created. I assume that the problem is with the gpg-agent's configuration, but I'm not sure. Has anyone already configured git to use a yubikey to sign commits and how has it been done? Cheers. |
Author: | irgendwer [ Sun Jan 15, 2017 9:55 pm ] |
Post subject: | Re: Yubikey 4 and git commit signing |
I, finally solved this issue. I'm running gpg 2.1.11 and hence the correct program to call ist gpg2 instead of gpg. For the ease of use I have an alias in my .bashrc, such that I can use gpg. However, git search for the program in the $PATH and hence does not care about the set alias. In order to make git work, I had to configure git to use gpg2 instead. This could - once you know, that you have to do it - easily be done: Code: git config --global gpg.pgrogram /usr/bin/gpg2
|
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |