Yubico Forum

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

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Dec 22, 2015 3:55 am 
Offline

Joined: Mon Dec 21, 2015 3:47 pm
Posts: 2
I have two yubikeys and I am trying to reproduce the process to replace one key in case I loose it.
Basically I use yubikey for OTP and GPG(ssh and sign code/commits/branches...), I imported the same set of keys to both yuikeys, when I try to use the second yubikey to do the same tasks I face this issue: "Please remove the current card and insert the one with serial number:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Hit return when ready or enter 'c' to cancel:"
ssh and git seems to be keeping references to the old key hardware, serial, and it is not accepting the new one. I found a workaround for the ssh issue in this url: http://donncha.is/2014/07/problems-using-an-openpgp-smartcard-for-ssh-with-gpg-agent/
But was not able to find a workaround for the git issue.
I really appreciate any help.

Thanks,
Moacy Barros


Top
 Profile  
Reply with quote  

Share On:

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

PostPosted: Wed Nov 09, 2016 12:54 pm 
Offline

Joined: Wed Nov 09, 2016 12:37 pm
Posts: 1
A bit of an old thread, but I had the same problem. I found it was because my secret keys were also stored in my gpgkeyring (had been messing around with PIV). To fix

Delete secret keys from keyring
Code:
gpg2 --delete-secret-key [KEYID]

Verify keys are gone
Code:
gpg -K

Re-add secret key stubs
Code:
gpg --card-status

Restart gpg-agent for good measure
Code:
PID=$(ps -A | grep "gpg-agent --daemon" | grep -v "grep" | awk '{print $1}'); [ -n "${PID}" ] && kill -9 "${PID}"; eval $(gpg-agent --daemon)


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 1 guest


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