fork-dev / Tracker

Bug and issue tracker for Fork for Mac
493 stars 12 forks source link

Unable to sign commit with GPG #2138

Closed foux closed 1 month ago

foux commented 1 month ago

Hi there,

Any time I try to sign a commit with GPG, I've got the following error :

$ git -c gpg.program=/Applications/Fork.app/Contents/Resources/gpg.sh commit --gpg-sign=xxxxx --file=/var/folders/j4/vgcg6c491wvg6nt84h5935lm0000gn/T/xxxxxxx

error: gpg failed to sign the data:
[GNUPG:] KEY_CONSIDERED xxxxxxxxxxx 2
[GNUPG:] BEGIN_SIGNING H8
[GNUPG:] PINENTRY_LAUNCHED 2109 curses 1.3.0 - - NONE - 501/20 0
gpg: signing failed: Inappropriate ioctl for device
[GNUPG:] FAILURE sign xxxxxxx
gpg: signing failed: Inappropriate ioctl for device

fatal: failed to write commit object

Any idea on how to solve this? Thanks

DanPristupov commented 1 month ago

Did you install pinentry-mac? https://github.com/fork-dev/Tracker/issues/1187#issuecomment-1466054071

foux commented 1 month ago

It works after adding pinentry-mac and echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf thanks!

Just FYI, as I had GNUPG tools installed prior ro Fork, I didn't get the message explaining about pinentry. Thanks for your help!