Skip to content

Instantly share code, notes, and snippets.

@lramosduarte
Last active March 9, 2019 23:49
Show Gist options
  • Save lramosduarte/96351d908228920c1f8b8714cd8cd980 to your computer and use it in GitHub Desktop.
Save lramosduarte/96351d908228920c1f8b8714cd8cd980 to your computer and use it in GitHub Desktop.
Basic uses for GPG-Keys

GPG keys

Create

Todo

Update expire date public key

$ gpg --edit-key your_secret_key
gpg> expire
gpg> save

Backup

$ gpg -a --export [email protected] > public-gpg.key # PUBLIC KEY
$ gpg -a --export-secret-keys [email protected] > secret-gpg.key # Private Key
$ gpg --export-ownertrust > ownertrust-gpg.txt

Restore

$ gpg --import secret-gpg.key # Private Key
$ gpg --import-ownertrust ownertrust-gpg.txt

Export Public Key

gpg --armor --export [email protected] > public_gpg.key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment