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, super helpful 🙌
I had to restart my
gpg-agent
after applying the configuration change:gpgconf --kill gpg-agent
(no need to restart it - it will be restarted automatically as soon as you try to interact with your keys, e.g.gpg --list-secret-keys --keyid-format long
)