Skip to content

Instantly share code, notes, and snippets.

@expatjedi
Created July 3, 2025 16:42
Show Gist options
  • Save expatjedi/fec62ee989ab307f67a882a490b6b253 to your computer and use it in GitHub Desktop.
Save expatjedi/fec62ee989ab307f67a882a490b6b253 to your computer and use it in GitHub Desktop.
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
# Set a gpg key for git:
git config --global user.signingkey your_key_id
# Auto-sign all commits globaly
git config --global commit.gpgsign true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment