Skip to the content.

Fix “Inappropriate ioctl for device” Error

gpg: signing failed: Inappropriate ioctl for device can be fixed by setting GPG_TTY variable -

Solution:

$ export GPG_TTY=$(tty)

Note: Add above line to ~/.bashrc file, to avoid running it everytime shell session starts.

Source: GitHub