902 B
902 B
| date | title | draft | snippet_types | seo_description | |
|---|---|---|---|---|---|
| 2020-06-20T13:43:46.000Z | moving gpg keys | false |
|
How to move GPG keys from one computer to the next. |
New laptop? Got to move over those GPG keys.
$ cd /tmp && mkdir gpg_export
$ gpg --output gpg_export/main_pub.gpg --armor --export t@travisshears.com
$ gpg --output gpg_export/main_sec.gpg --armor --export-secret-key t@travisshears.com
$ tar cvfz gpg_export.tar.gz ./gpg_export
$ gpg --symmetric ./gpg_export.tar.gz
Then move the encrypted tar to the new computer, with airdrop for example.
To import the keys.
$ gpg --decrypt gpg_export.tar.gz.gpg > gpg_export.tar.gz
$ tar xvfz gpg_export.tar
$ gpg --import gpg_export/main_sec.gpg
$ gpg --import gpg_export/main_pub.gpg
Source: