If you ever get the following error, while trying to sign with gpg:
gpg: signing failed: Inappropriate ioctl for device
try the following steps
Test if gpg is actually working:
======================
echo "test" | gpg2 --clearsign
======================
If you get error like this:
======================
[root@localhost]# echo "test" | gpg2 --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
======================
then try the following:
======================
[root@localhost]# export GPG_TTY=$(tty)
======================
If this fixes the problem, add it to your .bashrc or .bash_profile file
No comments:
Post a Comment
Comment