Git GPG signing

Create a key

If you don't have a key already, create one:

gpg --full-generate-key

The key should be RSA/RSA, 4096 bits, and expire in 2-5 years.

View the key:

gpg -k
gpg --list-secret-keys

pub   rsa4096 2020-09-15 [SC] [expires: 2025-09-14]

uid           [ unknown] Ongo Gablogian ( <>
sub   rsa4096 2020-09-15 [E] [expires: 2025-09-14]

Export public key

The public key will need to be submitted to your identity provider, for example added to your known keys in GitHub.

gpg --armor --export 988881adc9fc3655077dc2d4d757d480b5ea0e11

Configure Git

Configure your git client to always sign commits:

git config --global "Ongo Gablogian"
git config --global ""
git config --global user.signingkey "988881adc9fc3655077dc2d4d757d480b5ea0e11"
git config --global commit.gpgsign true