Skip to content

Instantly share code, notes, and snippets.

@d-rk
Created June 1, 2022 18:41
Show Gist options
  • Save d-rk/e85dcbb3f73c88224a265b77c95eee54 to your computer and use it in GitHub Desktop.
Save d-rk/e85dcbb3f73c88224a265b77c95eee54 to your computer and use it in GitHub Desktop.
sops/gpg key-pair generation
# generate a key pair
# 1. choose RSA
# 2. make sure the key does not expire
# 3. don't use a passphrase
gpg --full-generate-key
# export private key in ascii format
gpg --output ci.private.key --armor --export-secret-key your-mail@gmail.com
# export public key in ascii format
gpg --output ci.public.key --armor --export your-mail@gmail.com
# get fingerprint
gpg --list-key your-mail@gmail.com | grep -E [A-Z0-9]{40}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment