Skip to content

Instantly share code, notes, and snippets.

@pedrolamas
Last active December 28, 2021 22:52
Show Gist options
  • Save pedrolamas/267e86851e526c124e49e063f68f8737 to your computer and use it in GitHub Desktop.
Save pedrolamas/267e86851e526c124e49e063f68f8737 to your computer and use it in GitHub Desktop.
GPG cheat sheet

GPG Cheat Sheet

Generating a new key

gpg --gen-key

gpg --expert --full-gen-key

Exporting a public key

gpg --armor --output {filename} --export {keyid}

gpg --armor --export-options export-minimal --output {filename} --export {keyid}

Exporting a private key

gpg --armor --output {filename} --export-secret-key {keyid}

Importing a key

gpg --import {filename}

Deleting a public key

gpg --delete-key {keyid}

Deleting a private key

gpg --delete-secret-key {keyid}

Listing keys

gpg --list-keys

gpg --list-keys {keyid}

Listing private keys

gpg --list-secret-keys

gpg --list-secret-keys {keyid}

Signing a key

gpg --sign-key {keyid}

gpg --ask-cert-level --sign-key {keyid}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment