gopass icon indicating copy to clipboard operation
gopass copied to clipboard

error message obscures source

Open dirkx opened this issue 2 years ago • 2 comments

Summary

When working with smartcard/yubikeys/solokeys - the error message:

       gpg: decryption failed: Inappropriate ioctl for device

is typically related to something in the hardware real; such as not having inserted the USB solo key, the smartcard, or the latter having slightly dirty contacts.

However - it can also be triggered by an issue with the pin-entry; e.g. the latter having the wrong GPG_TTY value or similiar. One then needs to enable DBG on the gpg-agent to see the true reason:

      gpg-agent[2563] DBG: error calling pinentry: Inappropriate ioctl for device <Pinentry>

Which seems a bit hard for the user; especialy as the first is common; yet the latter is quite `fatal' - but needs DBG level logging to see.

Steps To Reproduce

Normal smarcard setup; observe the error by unseating the device.

Then reseat the device; test it works; and then do something like 'export GPG_TTY=/dev/fobar' to break pinentry.

Observe the very same error given.

Expected behavior

Some additional information from the source propagating to the command line; eg. the full error calling pinentry: Inappropriate ioctl for device <Pinentry>, etc.

Environment

Tried on OSX and FreeBSD. Not really environment related.

Additional context

Keep up the good work !

dirkx avatar Jan 20 '23 13:01 dirkx

These error messages are very annoying indeed. We can certainly try to provide more context, if we have it.

dominikschulz avatar Jan 29 '23 20:01 dominikschulz

At this point I don't see how we could easily provide more context. We're just calling into gpg and that does that rest.

dominikschulz avatar Feb 04 '23 13:02 dominikschulz