I have a new laptop on which I have installed GPG4WIN.
I then import all my known public keys for may correspondents.
I have my private key and subkeys on a YUBICO smart card.
The “Tools | Manage Smart Cards” option in Kleopatra sees the card and its keys
But I cannot certify or decrypt incoming messages and I cannot sign/encrypt files.
How do I make Kleopatra / GPG use my “secret” key on the smartcard?
it should just work. I can think that maybe another Application uses the Yubikey and that conflicts with GnuPG somehow.
Maybe you can try on the command line to sign something by doing:
"echo foo | gpg -asu “your yubikey keyid”
That can sometimes give you a better error.
Thank you, Andre.
The error is “gpg: signing failed: No secret key”
When I type in gpg --list-secret-keys I get nothing.
I think I have cracked it.
I have a batch file for switching between keys (I have two):
gpg-connect-agent “scd serialno” “learn --force” /bye
After running this, Kleopatra sees the Yubikey.
Mmh, this should not be neccessary but I am glad that you have solved your problem.
For the record (If someone sees this board message later) we are reworking our smartcard user interface currently, this will be much better with the next major update when we switch to GnuPG-2.3 which is currently in develpment.