<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=4&amp;t=2135" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2016-11-09T12:54:15+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=4&amp;t=2135</id>
<entry>
<author><name><![CDATA[markchalloner]]></name></author>
<updated>2016-11-09T12:54:15+01:00</updated>
<published>2016-11-09T12:54:15+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2135&amp;p=9154#p9154</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2135&amp;p=9154#p9154"/>
<title type="html"><![CDATA[Re: Please remove the current card and insert the one with s]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2135&amp;p=9154#p9154"><![CDATA[
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<br /><br />Delete secret keys from keyring<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg2 --delete-secret-key &#91;KEYID&#93;</div><br />Verify keys are gone<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg -K</div><br />Re-add secret key stubs<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg --card-status</div><br />Restart gpg-agent for good measure<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">PID=$(ps -A | grep &quot;gpg-agent --daemon&quot; | grep -v &quot;grep&quot; | awk '{print $1}'); &#91; -n &quot;${PID}&quot; &#93; &amp;&amp; kill -9 &quot;${PID}&quot;; eval $(gpg-agent --daemon)</div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4539">markchalloner</a> — Wed Nov 09, 2016 12:54 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[moacybarros]]></name></author>
<updated>2015-12-22T03:55:17+01:00</updated>
<published>2015-12-22T03:55:17+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2135&amp;p=8093#p8093</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2135&amp;p=8093#p8093"/>
<title type="html"><![CDATA[Please remove the current card and insert the one with seria]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2135&amp;p=8093#p8093"><![CDATA[
I have two yubikeys and I am trying to reproduce the process to replace one key in case I loose it.<br />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: &quot;Please remove the current card and insert the one with serial number:<br />   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br />Hit return when ready or enter 'c' to cancel:&quot;<br />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: <a href="http://donncha.is/2014/07/problems-using-an-openpgp-smartcard-for-ssh-with-gpg-agent/" class="postlink">http://donncha.is/2014/07/problems-using-an-openpgp-smartcard-for-ssh-with-gpg-agent/</a><br />But was not able to find a workaround for the git issue.<br />I really appreciate any help.<br /><br />Thanks,<br />Moacy Barros<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4095">moacybarros</a> — Tue Dec 22, 2015 3:55 am</p><hr />
]]></content>
</entry>
</feed>