Managing commit signature verification on Mac. The way to auto sign-commits.
- Check if
gpg2
is installed, runwhich gpg2
if the command outputs nothing, install GPG Keychain. - Using the GPG Keychain utility generate a new key pair.
- In the GPG Keychain, export the public key, save it to your documents folder.
- Login to your GitHub account and navigate to https://github.com/settings/keys.
- Open the exported public key and copy its contents.
- Get back to GitHub, press the "New GPG key" button and paste the copied key.
- Run
git config --global gpg.program gpg2
, to make sure git uses gpg2 and not gpg.