Skip to content

Instantly share code, notes, and snippets.

@lichti
Last active September 22, 2015 03:51
Show Gist options
  • Save lichti/5008d37c7e90056f6d0c to your computer and use it in GitHub Desktop.
Save lichti/5008d37c7e90056f6d0c to your computer and use it in GitHub Desktop.

Create a RSA keypair

gpg --gen-key

Generate a revocation certificate

gpg --gen-revoke [KEY_ID] > ~/.gnupg/revocation-[KEY_ID].crt

Make your public key public

gpg --keyserver pgp.mit.edu --send-key [KEY_ID]

Print your key

gpg -v --fingerprint [KEY_ID]

Export a public key into file [KEY_ID].pub

gpg --export -armor [KEY_ID] > [KEY_ID].pub

Export a private key into file [KEY_ID].key

gpg --export-secret-key -armor [KEY_ID] > [KEY_ID].key

List the keys in your public key ring:

gpg --list-keys

List the keys in your secret key ring:

gpg --list-secret-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment