GPG Key 导入导出

列出本地 gpg key

gpg --list-keys 
 
输出
-----------------------------
pub   rsa4096 2018-12-19 [SC]
      40514E1E7B468BD5D2677ADF95F744F090BAB3D5
uid           [ 绝对 ] xxxxx (xx) <xxxx@xxx.com>
sub   rsa4096 2018-12-19 [E]

导出

gpg --output xx.pub.gpg.key --armor --export 40514E1E7B468BD5D2677ADF95F744F090BAB3D5
gpg --output xx.sec.gpg.key --armor --export-secret-key 40514E1E7B468BD5D2677ADF95F744F090BAB3D5

导入

gpg --import xx.pub.gpg.key
gpg --allow-secret-key-import --import xx.sec.gpg.key

发表新评论