GPG Key Migration
Migrate GPG Keys from One Workstation to Another
Replace [your key] with your key ID
To obtain your key ID
gpg --list-secret-keys --keyid-format LONG
Which returns something like
/home/angela/.gnupg/pubring.kbx
-------------------------------
sec rsa4096/[your key] 2018-03-30 [SC]
ABCDEFGHIJKLMNOPQRSTUVWXYZ
uid [ unknown] angela (KEY NAME) <user@domain>
ssb rsa4096/ABCDEFGHIJKL 2018-03-30 [E]
After the key size rsa4096/
is your key ID.
Export the key in preparation to move it
gpg --export -a [your key] > gpg-pub.asc
Prepare the secret key for migration (if password protected, you’ll be prompted to enter it)
Read more...