
Pinentry-program /usr/local/bin/pinentry-macįor my Linux system with a GUI and gpg 2.2.19, neither killing gpg-agent (which starts itself again), unsetting $DISPLAY or setting $GPG_TTY worked for me because it was trying to use pinentry-gnome to ask for the password from the console.
GPG SUITE UPGRADE INSTALL
Gnupg: stable 2.2.6 (bottled) git config -global gpg.program gpgĪnd there has pinentry-mac for passphrase entry brew install pinentry-mac The gpg2 is combined with gpg in brew and hence the gpg command is pointed to gpg2 brew install gpg2 To ~/.zshrc if using zsh, else append to ~/.bash_profile Reminded by my colleague, need to append export GPG_TTY=$(tty) Sec rsa2048/ 0A61C6FC git config -global user.signingkey 0A61C6FC Refer to and Ho solution, I solved my problem via following steps.Īssume gpg2 installed by brew, git config -global gpg.program gpg2

If after that install, you re-try git commit and still get a " failed to sign the data" error, do: run brew install pinentry to ensure you have a good tool installed for passphrase entry.If that all looks all right, one next thing to try: run echo "test" | gpg -clearsign, to make sure gpg itself is working.run gpg -version, and make sure you have GnuPG version 2+ (not version 1) installed.For troubleshooting, two things to first try:
