You can sign commits via GPG
. Since 2022 you can also sign with SSH
.
-
Your git email must match GitHub (either real email, or anonymous one):
git config --global user.email "[email protected]"
-
Create or reuse an SSH key for signing
GitHub > User Menu > Settings > SSH and GPG keys
If you authenticate via SSH, you can also re-upload the same key for signing again
-
Setup your local git
git config --global gpg.format ssh git config --global commit.gpgSign true git config --global user.signingKey "path-to-private-key"
Run the following command. You must supply the old password, and enter a new one.
ssh-keygen -p -f /path/to/private_key