


GPG TOOLS GPG SUITE TUTORIAL 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 run export GPG_TTY=$(tty) and/or add that to your ~/.bashrc or ˜/.bash_profile.If you get an error message saying “Inappropriate ioctl for device”, do this: run gpg -gen-key, to have GnuPG walk you through the steps for creating a key pair.If the output of that shows you have no secret key for GnuPG to use, you need to create one: run gpg -K -keyid-format SHORT, to check that you have at least one key pair.Otherwise, some basic steps to run to check you’ve got a working GnuPG environment: run gpgconf -kill gpg-agent to kill any running agent that might be hung.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:
