Skip to content

Instantly share code, notes, and snippets.

@ludwigdn
Last active September 15, 2021 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludwigdn/155e925a7457789a2a8b724a7c6fd3bd to your computer and use it in GitHub Desktop.
Save ludwigdn/155e925a7457789a2a8b724a7c6fd3bd to your computer and use it in GitHub Desktop.
GPG cheatsheet

GPG Cheatsheet

Generate a key

gpg --full-generate-key

List keys

gpg —list-keys
gpg --list-secret-keys --keyid-format LONG

Sign

gpg —recipient <EMAIL> —clearsign <FILE>
gpg —verify <FILE>

Encrypt

gpg —recipient <EMAIL> —encrypt <FILE>
gpg —decrypt <FILE> —output decrypted

Encrypt and sign

gpg —recipient <EMAIL> —sign —encrypt <FILE>
gpg —decrypt <FILE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment