Skip to content

Instantly share code, notes, and snippets.

@Thesephi
Last active September 11, 2021 13:46
Show Gist options
  • Save Thesephi/3117e7752b7a40007a5f3635a364b718 to your computer and use it in GitHub Desktop.
Save Thesephi/3117e7752b7a40007a5f3635a364b718 to your computer and use it in GitHub Desktop.
simple gpg key management
# view list of keys available on the system
gpg --list-secret-keys --keyid-format=long
# generate a new key (to be associated with a specific email address for which you'll be prompted)
gpg --full-generate-key # might differ depending on the gpg version being used
# echo pub key to the console
gpg -a --export your@email.example.com
# example use case: sign git commits with your gpg key
git config [--global] user.signingkey YOUR_GPG_KEY_ID
git config [--global] user.email YOUR_GPG_KEY_ASSOCIATED_EMAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment