Skip to content

Instantly share code, notes, and snippets.

View jaguilar87's full-sized avatar

Jordi Aguilar jaguilar87

  • Gartner Digital Markets
  • Barcelona
  • 15:32 (UTC +02:00)
View GitHub Profile
@cezaraugusto
cezaraugusto / gpg_fix.txt
Last active August 3, 2024 16:53
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung