In my work environment, I currently use a smart card yubikey device for signing commits and encryption/decryption tasks. Apparently, some updates caused me some issues so now my computer cannot find the private key from my device.
In fact, whenever I try to export my secret keys:
gpg --export-secret-keys
I get a message like this: gpg: WARNING: nothing exported
Also encrypting/decrypting files has become impossible:
1) encrypting
gpg --encrypt --sign --armor -r [email protected] plain.txt
gpg: no default secret key: No secret key
gpg: plain.txt: sign+encrypt failed: No secret key
2) Decrypting
gpg --decrypt to-decrypt.asc > decrypted.txt
gpg: decryption failed: No secret key
Please note: printing public keys and the command gpg --card-status
correctly work and print data. Apparently the problem is related to the private key missing. Any idea?