When getting the following error:
shaji:netatmo-to-json/ (master✗) $ git commit -S -m "systemd support and refactoring"
error: gpg failed to sign the data
fatal: failed to write commit object
echo "test" | gpg --clearsign
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
If the above command fails:
export GPG_TTY=$(tty)
Try again and the first command below should ask for pinentry. If it does you should be able to commit:
echo "test" | gpg --clearsign
git config -l | grep gpg
gpg.program=gpg commit.gpgsign=true