Git: Autosign commits
After generating a GPG key and adding it to your Github account, automatically signing your commits is very straightforward.
- First, find your key ID via
gpg --list-secret-keys --keyid-format LONG
- Then, configure Git use the said key globally
git config --global user.signingkey KEY_ID
- Check that
user.email
matches the one in your GPG key, and to be nice,user.name
matches your Github username ingit config --global --list
. - Finally, tell Git to sign all commits with the above credentials
git config --global commit.gpgsign true
Following the above, all of your commits should show a nice Verified badge next to them.