<div dir="ltr">WOW! That works.<div><br></div><div>To document this, if anyone ever run into this situation:</div><div><br></div><div>> sec# rsa4096/0xC9E7221DAFCE6539 created: 2018-08-07 expires: never</div><div>This is the key I need to delete from the card/yubikey.</div><div><br></div><div>1. gpg --delete-key 0xC9E7221DAFCE6539</div><div><br></div><div>2. gpg --card-status should return NONE and gpg --list-keys would return gpg: no ultimately trusted keys found</div><div> </div><div>3. pull out the card</div><div><br></div><div>4. run gpg --import PUBLIC_KEY_FILE</div><div><br></div><div>5. insert the card</div><div><br></div><div>6. gpg --card-status</div><div><br></div><div>7. now try to encrypt and decrypt (you will be prompted to enter your PIN to unlock your card).</div><div><br></div><div>Thank you Dirk!</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 7, 2018 at 7:59 PM Dirk Gottschalk <<a href="mailto:dirk.gottschalk1980@googlemail.com">dirk.gottschalk1980@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
Am Dienstag, den 07.08.2018, 19:38 -0400 schrieb Yu:<br>
> Hi Dirk<br>
<br>
> Thank you very much. I just want to make sure I am doing the right<br>
> thing,<br>
> so please excuse me if I am asking too much.<br>
<br>
> > You should delete the complete secret key set from you keyring. <br>
> Then<br>
> > import the PUBLIC keys for the card keys and then do a gpg --card-<br>
> > status.<br>
> > <br>
> > <br>
> <br>
> Do I just call "gpg delete-secret-key ID" for each key ID listed in<br>
> the<br>
> --list-secret-keys output?<br>
<br>
You have just to delete the keys, which are stored on the card.<br>
Deleteing the master key of them also deletes the sub keys.<br>
<br>
<br>
> > If you set a fetch URL, you could also make --card-edit and issue a<br>
> > fetch command.<br>
> > <br>
> <br>
> I have not :/<br>
<br>
That's no problem at all. Then you have to imnport the public key of<br>
the card key BEFORE you insert the card and make --card-status. Only<br>
then the card is recognised and the stubs are generated automatically.<br>
<br>
If the public keys are not in your public keyring, the card keys are<br>
ignored.<br>
<br>
Regards,<br>
Dirk<br>
<br>
-- <br>
Dirk Gottschalk<br>
Paulusstrasse 6-8<br>
52064 Aachen, Germany<br>
<br>
GPG: DDCB AF8E 0132 AA54 20AB B864 4081 0B18 1ED8 E838<br>
Keybase.io: <a href="https://keybase.io/dgottschalk" rel="noreferrer" target="_blank">https://keybase.io/dgottschalk</a><br>
GitHub: <a href="https://github.com/Dirk1980ac" rel="noreferrer" target="_blank">https://github.com/Dirk1980ac</a><br>
<br>
</blockquote></div>