brew install gnupg
gpg --version
gpg --full-generate-key
gpg --ist-secret-keys --keyid-format=long
gpg --armor --export THE_ID_HERE
# --> copy this to your Github GPG keys if required
git config --global user.signingkey THE_ID_HERE
Pinentry setup on Mac:
brew install pinentry-mac
which pinentry-mac
echo “pinentry-program /opt/homebrew/bin/pinentry-mac” >> ~/.gnupg/gpg-agent.conf
Usage with git:
git commit -S -m “Commit “message” for signed commits
To restart:
killall gpg-agent && gpg-agent --daemon --use-standard-socket --pinentry-program /opt/homebrew/bin/pinentry-mac