Skip to content

Instantly share code, notes, and snippets.

@SaicharanKandukuri
Last active August 16, 2021 13:19
Show Gist options
  • Save SaicharanKandukuri/367622208827b2b192aff25cbb5e86f5 to your computer and use it in GitHub Desktop.
Save SaicharanKandukuri/367622208827b2b192aff25cbb5e86f5 to your computer and use it in GitHub Desktop.
gpg: signing failed: Inappropriate ioctl for device gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device

Error probably may look like this

root@clenon:~# echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device

fix

export GPG_TTY=$(tty)

permanent fix

echo "export GPG_TTY=\$(tty)" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment