If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:
- Generate and add your key to GitHub
$ git config --global commit.gpgsign true
([OPTIONAL] every commit will now be signed)$ git config --global user.signingkey ABCDEF01
(whereABCDEF01
is the fingerprint of the key to use)$ git config --global alias.logs "log --show-signature"
(now available as$ git logs
)$ git config --global alias.cis "commit -S"
(optional if global signing is false)$ git config --global tag.forcesignannotated "true"
([OPTIONAL] every annotated tag (git tag -a
) will now be signed.)$ git config --global tag.gpgSign "true"
([OPTIONAL] every tag will be signed.)$ echo "Some content" >> example.txt