Run:
brew install gnupg pinentry-mac
git config --global user.signingkey <key>
git config --global commit.gpgsign true
git config --global gpg.program gpg
Then add the following line to ~/.gnupg/gpg-agent.conf
:
pinentry-program /usr/local/bin/pinentry-mac
or, if using the new Homebrew location:
pinentry-program /opt/homebrew/bin/pinentry-mac
thanks a lot, for saving my day!