On Wed, Oct 15, 2025 at 12:34:56PM +1000, Scrub wrote:
> gpg: selecting card failed: Service is not running
> gpg: OpenPGP card not available: Service is not running

Here is a dump of my notes when I run into the same issue.
Exported from org, hence the formatting:

Install and enable pcscd:

,----
| pkg_add pcsc-lite
| rcctl enable pcscd
| rcctl start pcscd
`----

Scan for inserted key:

,----
| pcsc_scan -r
`----

,----
| No reader found.
`----

Without `-r' it will scan infinitely for newly connected cards. Exit
this mode with `C-c'.

In [gpg.conf] enable agent:

,----
| use-agent
`----

In [gpg-agent.conf] make sure paths to `pinentry' and `scdaemon' are
set. This step might be option if it works ootb.

,----
| pinentry-program /usr/local/bin/pinentry-curses
| scdaemon-program /usr/local/libexec/scdaemon
`----

In [scdaemon.conf] switch driver to [libpcsclite] and disable [GnuPG
CCID], as `gpg' cannot talk to USB devices directly:

,----
| pcsc-driver /usr/local/lib/libpcsclite.so.1.0
| disable-ccid
`----

To restart smartcard daemon and agent:

,----
| gpgconf --kill scdaemon &&
| gpgconf --kill gpg-agent &&
| gpgconf --launch gpg-agent &&
| echo "rc: $?"
`----

,----
| rc: 0
`----

Test card status:

,----
| gpg --card-status | head -1
`----

,----
| Reader ...........: Yubico YubiKey OTP FIDO CCID 00 00
`----

Best regards,
Chris Narkiewicz

Reply via email to