Let's consider my private key to be oncard.
- No reader connected C:\temp>gpg --clearsign -a test111.txt gpg: NOTE: THIS IS A DEVELOPMENT VERSION! gpg: It is only intended for test purposes and should NOT be gpg: used in a production environment or with production keys! gpg: pcsc_list_readers failed: unknown PC/SC error code (0x8010002e) gpg: card reader not available gpg: signing failed: general error gpg: test111.txt: clearsign failed: general error
I get a error message that clearly says that no reader is being attached. This case is ok!
- Card reader present but no card inserted In that case I get the same above error message which can be misleading ("card reader not available"). The strange behavior I observe is an additional Error pop-up window that shows up to tell me that gpg.exe has generated some errors and will be terminated by Windows.
See attached screenshots for more details.
How To Repeat
reader connected, no card inserted :
gpg --clearsign -a test.txt
--> produces a misleading error message + additional Windows Error box!