Skip to content

Instantly share code, notes, and snippets.

@pdostal
Created March 1, 2014 03:40
Show Gist options
  • Save pdostal/9284724 to your computer and use it in GitHub Desktop.
Save pdostal/9284724 to your computer and use it in GitHub Desktop.
GPG cheat sheet
$ gpg --gen-key
# 1) RSA and RSA (default)
# RSA keys may be between 1024 and 8192 bits long.
# You can set 'default-key $ID' in ~/.gnupg/gpg.conf
$ gpg --list-keys
$ gpg --list-secret-keys
$ gpg --export -a $ID > gpg-pubkey.asc
$ gpg --keyserver keys.gnupg.net --send-keys $ID
$ gpg --check-sigs $ID
$ gpg --clearsign < file.txt > signed_file.txt #sign text
$ gpg -b file.txt #sign file
$ gpg --verify file.txt.sig
$ gpg --keyserver keys.gnupg.net --search-keys $STRING
$ gpg --keyserver keys.gnupg.net --recv-key $ID
$ gpg --sign-key $ID
$ gpg --keyserver keys.gnupg.net --send-key $ID
$ gpg --gen-revoke $ID
$ gpg --delete-keys $ID
$ gpg --delete-secret-keys $ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment