Skip to content

Instantly share code, notes, and snippets.

@sorashi
Last active November 3, 2019 14:55
Show Gist options
  • Save sorashi/93d820200887be98738e0d768a098a81 to your computer and use it in GitHub Desktop.
Save sorashi/93d820200887be98738e0d768a098a81 to your computer and use it in GitHub Desktop.
GPG keychain export and import with ownertrust

How to move PGP keys and ownertrust using GPG to a new computer / machine

Export

gpg -a --export > pubkeys.asc
gpg -a --export-secret-keys > privatekeys.asc
gpg --export-ownertrust > otrust.txt

Import

gpg --import privatekeys.asc
gpg --import pubkeys.asc
gpg --import-ownertrust otrust.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment