Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 2:08 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Jan 14, 2017 7:03 pm 
Offline

Joined: Sat Jan 14, 2017 6:56 pm
Posts: 2
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.


Last edited by irgendwer on Sun Jan 15, 2017 9:55 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Sun Jan 15, 2017 9:55 pm 
Offline

Joined: Sat Jan 14, 2017 6:56 pm
Posts: 2
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group