Signing git commits with GPG on macOS for GitHub/GitLab

First, install GnuPG in order to create the keys for signing the git commits. Also install pinentry-mac which git/gpg requires later for displaying the passphrase dialog in order to decrypt your keys. brew install gnupg pinentry-mac Create a GPG key-pair: gpg --full-gen-key GPG will ask your for some more information. Use RSA/RSA (1) for the key kind, 4096 for the keysize, an expiration date for the keys, a name and email (this should be the same as the name and email you are using for your git commits). … »