GPG error: Inappropriate ioctl for device

NIIBE Yutaka gniibe at fsij.org
Fri Jul 19 02:04:00 CEST 2024


Hello,

Siva Krishna Sayavarapu wrote:
> gpg: signing failed: Inappropriate ioctl for device

I think that this is due to pinentry program (it complains that there's
no suitable device, tty, to ask passphrase).

Well, older GnuPG was more friendly in those situations where a
programmer wants to feed passphrase input by other method.

> --passphrase-fd 0 --no-tty --batch --sign --encrypt --compress-algo 1 --cipher-algo cast5

IIUC about your intention by using --passphrase-fd, what you need here
is an option --pinentry-mode=loopback (not to use an external pinentry
program).

Hope this helps,
-- 



More information about the Gnupg-users mailing list