verified commit
  • Install gpg1:
    • brew install gpg1
  • Set the encoding as utf-8:
    • vim ~/.gnupg/gpg.conf then uncomment charset utf-8
  • Check if you already have GPG keys installed
    • gpg --list-secret-keys --keyid-format LONG
  • If not, generate a new one:
    • gpg --gen-key
  • Get the public key:
    • gpg --armor --export ABCDEF
    • Paste that on
  • Configure git to always sign commits with this key:
    • git config --global gpg.program gpg1
    • git config --global commit.gpgsign true
    • git config --global user.signingkey ABCDEF
  • Get gpgtools to store passphrase in MacOS:
    • brew cask install gpgtools (requires sudo access)
    • Open “GPG Keychain”, select key, “change passphrase”, “store in keychain”
gpg tools
gpg tools - change password
  • Commit like usual:
    • git commit ...
    • git merge ...
    • git pull ...