我觉得是你导出私钥的时候没有保存好吧。你是怎么导出私钥的?
一般来说 gpg --export-secret-keys 导出私钥会把导出的私钥直接输出到标准输出,这时候都会用 > 重定向到文件里,比如: gpg --export-secret-keys --armour YOURKEY > SECRETKEYFILE 一般这样操作是不会有啥问题的,建议你重新导出一次。同时建议配合 --armour 或 --armor 选项使用,导出以后打开文件看看是不是完整。文件的开头结尾应该有-----BEGIN PGP SECRET KEY BLOCK----- 和 -----END PGP SECRET KEY BLOCK----- 标记的 On Fri, Dec 28, 2018 at 12:20 AM chenlhlinux <chenlhli...@qq.com> wrote: > > 大家好: > 刚刚我想在gpg中导入我的私钥,命令是:gpg --import 私钥文件名 > 报错信息为: > gpg: key 171F1787E07E87D2: "chenlhlinux (clh) <chenlhli...@qq.com>" not > changed > gpg: error getting the KEK: End of file > gpg: Total number processed: 1 > gpg: unchanged: 1 > gpg: secret keys read: 1 > 经确认,私钥文件没有问题,且公钥可以正常导入。 > 请问这是什么原因,如何解决? > > > 感谢! -- /*** * @ 启智开源 编码自由 * @ Open Mind, Open Source, Coding for Freedom! * @ 佟辉 Tong Hui (Tony) * @ Email tonghuix AT member DOT fsf DOT org * @ Web https://tonghuix.io * @ XMPP/Jabber tonghuix AT member DOT fsf DOT org */