<?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=35&amp;t=2231" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2017-06-12T21:00:56+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=35&amp;t=2231</id>
<entry>
<author><name><![CDATA[codemonkee]]></name></author>
<updated>2017-06-12T21:00:56+01:00</updated>
<published>2017-06-12T21:00:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=9611#p9611</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=9611#p9611"/>
<title type="html"><![CDATA[Re: [SOLVED] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=9611#p9611"><![CDATA[
Sorry to dig up an old thread, but I ran into the same error message via command prompt but worked through GUI, which stumped me for a moment - So thought it could be useful.<br /><br />My particular case ended up being conflicting version of GPG and an older 1.4.x being supplied by Git for Windows. <br />I have redefined my user PATH environment variable with gpg4win being higher in the variable, but Git's instance was still taking priority and I ended up having to alter both user and system PATH for it to default (which I found odd on it's own).<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\&gt;which -a gpg<br />/usr/bin/gpg<br />/c/Program Files (x86)/GnuPG/bin/gpg<br />/usr/bin/gpg<br />/c/Program Files (x86)/GnuPG/bin/gpg<br />C:\&gt;&quot;C:\Program Files\Git\usr\bin\gpg.exe&quot; --version<br />gpg (GnuPG) 1.4.21<br />Copyright (C) 2015 Free Software Foundation, Inc.<br />License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br />This is free software: you are free to change and redistribute it.<br />There is NO WARRANTY, to the extent permitted by law.<br /><br />Home: ~/.gnupg<br />Supported algorithms:<br />Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA<br />Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,<br />        CAMELLIA128, CAMELLIA192, CAMELLIA256<br />Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224<br />Compression: Uncompressed, ZIP, ZLIB, BZIP2<br /><br />C:\&gt;&quot;C:\Program Files (x86)\GnuPG\bin\gpg.exe&quot; --version<br />gpg (GnuPG) 2.1.20<br />libgcrypt 1.7.6<br />Copyright (C) 2017 Free Software Foundation, Inc.<br />License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;<br />This is free software: you are free to change and redistribute it.<br />There is NO WARRANTY, to the extent permitted by law.<br /><br />Home: %APPDATA%/Roaming/gnupg<br />Supported algorithms:<br />Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA<br />Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,<br />        CAMELLIA128, CAMELLIA192, CAMELLIA256<br />Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224<br />Compression: Uncompressed, ZIP, ZLIB, BZIP2<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4817">codemonkee</a> — Mon Jun 12, 2017 9:00 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-03-01T20:57:18+01:00</updated>
<published>2016-03-01T20:57:18+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8423#p8423</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8423#p8423"/>
<title type="html"><![CDATA[Re: [SOLVED] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8423#p8423"><![CDATA[
No problem, thanks for your help!<br /><br />I added a small UPDATE to the original post.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Tue Mar 01, 2016 8:57 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ChrisHalos]]></name></author>
<updated>2016-03-01T20:46:17+01:00</updated>
<published>2016-03-01T20:46:17+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8422#p8422</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8422#p8422"/>
<title type="html"><![CDATA[Re: [SOLVED] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8422#p8422"><![CDATA[
Glad you got this straightened out! Thanks for keeping us updated.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3140">ChrisHalos</a> — Tue Mar 01, 2016 8:46 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-03-01T04:08:56+01:00</updated>
<published>2016-03-01T04:08:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8420#p8420</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8420#p8420"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8420#p8420"><![CDATA[
Ah HA!<br /><br />Turns out it gpg itself locking the card (wtf?)<br /><br />I needed to add &quot;card-timeout 1&quot; to my scdaemon.conf file (located at %APPDATA%\gnupg\scdaemon.conf)<br /><br />And now success!!!!<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\&gt;gpg -v --card-status<br />gpg: no running gpg-agent - starting one<br />gpg: waiting 5 seconds for the agent to come up<br />Application ID ...: DXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br />Version ..........: 2.1<br />Manufacturer .....: Yubico<br />Serial number ....: XXXXXXXX<br />Name of cardholder: &#91;not set&#93;<br />Language prefs ...: &#91;not set&#93;<br />Sex ..............: unspecified<br />URL of public key : &#91;not set&#93;<br />Login data .......: &#91;not set&#93;<br />Signature PIN ....: not forced<br />Key attributes ...: 2048R 2048R 2048R<br />Max. PIN lengths .: 127 127 127<br />PIN retry counter : 3 0 3<br />Signature counter : 0<br />Signature key ....: &#91;none&#93;<br />Encryption key....: &#91;none&#93;<br />Authentication key: &#91;none&#93;<br />General key info..: &#91;none&#93;<br /><br />C:\&gt;</div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Tue Mar 01, 2016 4:08 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-03-01T03:42:04+01:00</updated>
<published>2016-03-01T03:42:04+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8419#p8419</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8419#p8419"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8419#p8419"><![CDATA[
Ah, another clue: I added the &quot;log-file&quot; directive to my scdaemon.conf and the log shows:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">2016-02-29 21:37:59 scdaemon&#91;11500&#93; detected reader `Yubico Yubikey 4 OTP+U2F+CCID 0'<br />2016-02-29 21:37:59 scdaemon&#91;11500&#93; pcsc_connect failed: sharing violation (0x8010000b)<br />2016-02-29 21:37:59 scdaemon&#91;11500&#93; updating slot 0 status: 0x0000-&gt;0x0007 (0-&gt;1)<br />2016-02-29 21:37:59 scdaemon&#91;11500&#93; triggering event e0 (000000E0) for client -1<br /></div><br /><br />So maybe it's GPG's need for exclusive access to the card...?<br /><br />Now I just need to find out what is accessing the card...<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Tue Mar 01, 2016 3:42 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-02-29T14:55:34+01:00</updated>
<published>2016-02-29T14:55:34+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8418#p8418</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8418#p8418"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8418#p8418"><![CDATA[
Sorry for the slow reply.<br /><br />This is Windows 7 (I have the &quot;classic theme&quot; on)<br /><br /><img src="http://i.imgur.com/dxvvYT4.png" alt="Image" /><br /><br />So I tried scd apdu 00 44 00 00 and it didn't work, BUT I tried once more this morning before I posted this and it worked??<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\&gt;gpg-connect-agent --hex<br />&gt; scd apdu 00 44 00 00<br />D&#91;0000&#93;  90 00                                              ..<br />OK</div><br /><br /><img src="http://i.imgur.com/J4PHOAh.png" alt="Image" /><br /><br />But now I'm back to the original problem:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&gt; scd apdu 00 f1 00 00<br />ERR 100663404 Card error &lt;SCD&gt;<br />&gt; scd serialno<br />ERR 100663404 Card error &lt;SCD&gt;<br /><br />C:\&gt;gpg --card-status<br />gpg: selecting openpgp failed: Card error<br />gpg: OpenPGP card not available: Card error<br /><br />C:\&gt;gpg --version<br />gpg (GnuPG) 2.0.29 (Gpg4win 2.3.0)<br />libgcrypt 1.6.4<br />Copyright (C) 2015 Free Software Foundation, Inc.<br />License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br />This is free software: you are free to change and redistribute it.<br />There is NO WARRANTY, to the extent permitted by law.<br /><br />Home: C:/Users/tmg/AppData/Roaming/gnupg<br />Supported algorithms:<br />Pubkey: RSA, RSA, RSA, ELG, DSA<br />Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,<br />        CAMELLIA128, CAMELLIA192, CAMELLIA256<br />Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224<br />Compression: Uncompressed, ZIP, ZLIB, BZIP2</div><br /><br />Also with opensc's openpgp-tool:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\Program Files\OpenSC Project\OpenSC\tools&gt;openpgp-tool<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />error: not an OpenPGP card<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;openpgp-tool -vv<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; reader-pcsc.c:377:pcsc_detect_card_presence: returning with: 5<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; reader-pcsc.c:377:pcsc_detect_card_presence: returning with: 5<br />Connecting to card in reader Yubico Yubikey 4 OTP+U2F+CCID 0...<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card.c:148:sc_connect_card: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-entersafe.c:106:entersafe_match_card: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-rutoken.c:103:rutoken_match_card: called<br />2016-02-29 08:54:29.946 SELECT AID: 6A82<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; muscle.c:271:msc_select_applet&#058; returning with: -1200 (Card command failed)<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:2834:piv_match_card: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:720:piv_find_aid: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:683:piv_select_aid: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:701:piv_select_aid: returning with: 0 (Success)<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:2852:piv_init: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:720:piv_find_aid: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:683:piv_select_aid: called<br />2016-02-29 08:54:29.946 &#91;openpgp-tool&#93; card-piv.c:701:piv_select_aid: returning with: 0 (Success)<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:2609:piv_process_history: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:945:piv_get_cached_data: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:879:piv_get_data: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:447:piv_general_io: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:945:piv_get_cached_data: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:879:piv_get_data: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:447:piv_general_io: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:447:piv_general_io: called<br />Using card driver PIV-II  for multiple cards.<br />error: not an OpenPGP card<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; card-piv.c:2806:piv_finish: called<br />2016-02-29 08:54:29.961 &#91;openpgp-tool&#93; ctx.c:799:sc_release_context: called<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;</div><br /><br />Any more ideas to get this to work?<br /><br /><br /><br />Thanks for helping me with this.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Mon Feb 29, 2016 2:55 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ChrisHalos]]></name></author>
<updated>2016-02-24T02:12:05+01:00</updated>
<published>2016-02-24T02:12:05+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8396#p8396</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8396#p8396"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8396#p8396"><![CDATA[
What build of Windows is this?<br /><br />Can you try:<br /><br />gpg-connect-agent --hex<br />&gt; scd apdu 00 44 00 00<br /><br />It looks like you got through the terminate card step, but it hasn't been reactivated. Here is what my NEO Manager looks like before I reactivate the OpenPGP applet&#058;<br /><br /><img src="http://i.imgur.com/31vDokV.png" alt="Image" /><br /><br />Regarding the &quot;applet version&quot;, that is correct, the OpenPGP applet version will report as the firmware version. The YubiKey 4 is a monolithic firmware (applets are built into the firmware).<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3140">ChrisHalos</a> — Wed Feb 24, 2016 2:12 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-02-23T13:28:10+01:00</updated>
<published>2016-02-23T13:28:10+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8390#p8390</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8390#p8390"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8390#p8390"><![CDATA[
<strong>Have you tried running Command Prompt as Administrator?</strong><br /><br />Yes I was running in an elevated prompt<br /><br /><strong>Have you tried terminating the GnuPG processes in Task Manager and trying again?</strong><br /><br />Yes many times.<br /><br /><strong>Is your Admin PIN/PIN locked out from previous attempts?</strong><br /><br />I don't think so? Since I never got as far as to actually be able to SET the admin pin.<br />But hold on let me try to reset it and see if that helps (I'll have to use opensc to send the adpu commands)<br /><br />hmm well this is interesting after I sent the apdu 00 e6 00 00 command (which returned 90 00 as expected)<br />I can no longer send commands via opensc:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\Program Files\OpenSC Project\OpenSC\tools&gt;opensc-tool.exe -c openpgp -s 00e60000<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />Sending: 00 E6 00 00<br />Received (SW1=0x90, SW2=0x00)<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;opensc-tool.exe -c openpgp -s 00440000<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />Failed to connect to card: Card command failed</div><br /><br />It's not even returning the version anymore from the adpu 00 f1 00 00 command ....<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\Program Files\OpenSC Project\OpenSC\tools&gt;opensc-tool.exe -c openpgp -s 00f10000<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />Failed to connect to card: Card command failed</div><br /><br />Even more disturbing is that now the Yubikey NEO Manager doesn't show that there is a OpenPGP Applet on the device... (it used to show up)<br />I have attached a screenshot of the NEO Manager window.<br /><br />Does this mean I just nuked the OpenPGP Applet? If so where do I go from here?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Tue Feb 23, 2016 1:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ChrisHalos]]></name></author>
<updated>2016-02-23T01:15:03+01:00</updated>
<published>2016-02-23T01:15:03+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8388#p8388</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8388#p8388"/>
<title type="html"><![CDATA[Re: [QUESTION] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8388#p8388"><![CDATA[
Have you tried running Command Prompt as Administrator?<br /><br />Is your Admin PIN/PIN locked out from previous attempts?<br /><br />Have you tried terminating the GnuPG processes in Task Manager and trying again?<br /><br />I'm running the same as you (GnuPG 2.0.29, Gpg4win 2.3.0, libgcrypt 1.6.4 - Windows 10 currently) and haven't come across &quot;card error&quot; before.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3140">ChrisHalos</a> — Tue Feb 23, 2016 1:15 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[travis9]]></name></author>
<updated>2016-03-01T21:00:30+01:00</updated>
<published>2016-02-22T22:41:50+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8386#p8386</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8386#p8386"/>
<title type="html"><![CDATA[[SOLVED] - Yubikey4 openpgp gnupg gpg Card Error]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2231&amp;p=8386#p8386"><![CDATA[
<strong>SOLVED:</strong><br />GPG requires exclusive access to the reader, and was somehow locking itself from accessing the card?<br />I had to add &quot;card-timeout 1&quot; to my scdaemon.conf file<br /><ul><li>File edited (I had to create the file):<div class="codetitle"><b>Code:</b></div><div class="codecontent">%APPDATA%\gnupg\scdaemon.conf</div></li><li>Lines Added to File: <div class="codetitle"><b>Code:</b></div><div class="codecontent">log-file scdaemon.log.txt<br />card-timeout 1</div></li></ul><br /><strong>UPDATE:</strong><br />I'm not sure why but every once in a while GnuPG is still convinced that it can't get exclusive access to the card...<br />However it seems that just opening and closing that <a href="https://developers.yubico.com/yubioath-desktop/Releases/" class="postlink">Yubico Authenticator</a> fixes the problem. (I have the &quot;kill scdaemon on show&quot; option checked in settings)<br />It's strange, because it fixes the problem even if I don't have the kill scdaemon option checked.<br />It's like whatever the Yubico Authenticator does when it exits releases the card properly or something.<br />Also worth noting, manually killing gpg-agent or scdaemon does NOT fix the problem.<br />The only thing that does (on the rare occasion it pops up again) is opening and closing the Yubico Authenticator<br /><br /><br /><strong>ORIGINAL QUESTION:</strong><br /><br />I am getting the following error when trying to use the gpg to access the openpgp applet on my new Yubikey 4:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg: selecting openpgp failed: Card error<br />gpg: OpenPGP card not available: Card error<br /></div><br /><br />The strange thing is the version returned by sending the apdu 00 f1 00 00 command (via opensc since gnupg isn't working) returns version 4.2.7 which is the firmware version of my yubikey.<br />According to <a href="https://developers.yubico.com/ykneo-openpgp/Release_Notes.html" class="postlink">this page</a> the latest version is 1.0.11<br /><br />I tried the <a href="http://forum.yubico.com/viewtopic.php?f=35&amp;t=2053" class="postlink">delete all entries from device manager</a> trick with no effect<br /><br />Any ideas why gpg isn't working?<br /><br />running windows 7 64bit [Version 6.1.7601]<br />gpg (GnuPG) 2.0.29 (Gpg4win 2.3.0)<br />yubikey firmware version 4.2.7<br /><br />below is the full output of my gpg/opensc commands:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">C:\Program Files (x86)\GNU\GnuPG&gt;gpg2 --version<br />    gpg (GnuPG) 2.0.29 (Gpg4win 2.3.0)<br />    libgcrypt 1.6.4<br />    Copyright (C) 2015 Free Software Foundation, Inc.<br />    License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br />    This is free software: you are free to change and redistribute it.<br />    There is NO WARRANTY, to the extent permitted by law.<br /><br />    Home: C:/Users/tmg/AppData/Roaming/gnupg<br />    Supported algorithms:<br />    Pubkey: RSA, RSA, RSA, ELG, DSA<br />    Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,<br />            CAMELLIA128, CAMELLIA192, CAMELLIA256<br />    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224<br />    Compression: Uncompressed, ZIP, ZLIB, BZIP2<br /><br />C:\Program Files (x86)\GNU\GnuPG&gt;gpg2 --card-status<br />    gpg: selecting openpgp failed: Card error<br />    gpg: OpenPGP card not available: Card error<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;opensc-tool.exe -l<br />    # Detected readers (pcsc)<br />    Nr.  Card  Features  Name<br />    0    Yes             Yubico Yubikey 4 OTP+U2F+CCID 0<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;opensc-tool.exe -vv -c openpgp -s 00f10000<br />        2016-02-22 15:48:44.199 &#91;opensc-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />        2016-02-22 15:48:44.199 &#91;opensc-tool&#93; reader-pcsc.c:377:pcsc_detect_card_presence: returning with: 1<br />    Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID 0<br />        2016-02-22 15:48:44.215 &#91;opensc-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />        2016-02-22 15:48:44.215 &#91;opensc-tool&#93; reader-pcsc.c:377:pcsc_detect_card_presence: returning with: 1<br />    Connecting to card in reader Yubico Yubikey 4 OTP+U2F+CCID 0...<br />        2016-02-22 15:48:44.215 &#91;opensc-tool&#93; card.c:148:sc_connect_card: called<br />        2016-02-22 15:48:44.215 &#91;opensc-tool&#93; reader-pcsc.c:301:refresh_attributes: returning with: 0 (Success)<br />    Using card driver OpenPGP card.<br />    Sending: 00 F1 00 00<br />    Received (SW1=0x90, SW2=0x00):<br />    04 02 07 ...<br />        2016-02-22 15:48:44.231 &#91;opensc-tool&#93; ctx.c:799:sc_release_context: called<br /><br />C:\Program Files\OpenSC Project\OpenSC\tools&gt;<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4219">travis9</a> — Mon Feb 22, 2016 10:41 pm</p><hr />
]]></content>
</entry>
</feed>