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