Skip to content

Instantly share code, notes, and snippets.

@saikocat
Created March 12, 2025 04:02
Show Gist options
  • Save saikocat/b2325c844670c1a9c338aa44ce3bf3d3 to your computer and use it in GitHub Desktop.
Save saikocat/b2325c844670c1a9c338aa44ce3bf3d3 to your computer and use it in GitHub Desktop.
gpg
## Set Passphrase
$ gpg --edit-key Your-Key-ID-Here
gpg> passwd
gpg> save
## New
$ gpg --full-gen-key
$ gpg --output revocation-certificate.asc --gen-revoke <key>
$ gpg --armor --export-secret-keys <key> > <key>_secret.asc
$ gpg --send-keys <key>
##
$ gpg --list-secret-keys --keyid-format=long
$ gpg --export -a [your key] > gpg-pub.asc
$ gpg --export-secret-keys -a [your key] > gpg-sc.asc
$ gpg --import gpg-pub.asc
$ gpg --import gpg-sc.asc
$ gpg --edit-key [your key]
## Delete
$ gpg --delete-secret-key [uid1] [uid2]
$ gpg --delete-key [uid1] [uid2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment