这就很奇怪了,理论上来说 gpg v1 导出的私钥 gpg v2 是应该能够支持的啊。
不如再生成一个测试密钥多做一些测试吧,也许是 gpg 的一个bug呢。 On Fri, Dec 28, 2018 at 9:52 PM chenlhlinux <chenlhli...@qq.com> wrote: > > 我发现出问题的的机器上的gpg的版本号为2.2.12,正常的机器上的gpg的版本号为1.*。刚刚我在异常的机器上安装了1.4.23版本的gpg,现在已经可以正常导入。 > 感谢! > ---Original--- > From: "Shell Xu"<shell909...@gmail.com> > Date: Fri, Dec 28, 2018 20:54 PM > To: "chenlhlinux"<chenlhli...@qq.com>; > Cc: "debian-chinese-gb@lists debian. org"<debian-chinese-gb@lists.debian.org>; > Subject: Re: gnupg导入私钥的问题 > > 那么首先恭喜你,避免了最糟的情况。 > 能对比一下你正常机器和异常机器的差异么?两者分别是什么发行,gpg的版本号各是多少? > > On Fri, Dec 28, 2018 at 1:40 PM chenlhlinux <chenlhli...@qq.com> wrote: >> >> 私钥在其他的机器上导入是正常的,私钥应该没有问题。 >> ---Original--- >> From: "Shell Xu"<shell909...@gmail.com> >> Date: Fri, Dec 28, 2018 09:59 AM >> To: "chenlhlinux"<chenlhli...@qq.com>; >> Cc: "debian-chinese-gb@lists debian. >> org"<debian-chinese-gb@lists.debian.org>; >> Subject: Re: gnupg导入私钥的问题 >> >> 我问个题外话。备份出来的时候有试过测试恢复/导入么?理论上私钥都是要测试恢复的,否则等发生问题发现备份出了错就有意思了。 >> 简单测试方法是设定GNUPGHOME环境变量,这样会产生一个和当前隔离的环境。如果这个环境下可以正常导入,那说明基本无大问题了。 >> 我一般还会把~/.gnupg连根拷贝一份,以防万一。 >> >> 如果备份的时候已经经过了测试恢复,那么你可以试试找第二台机器去导入,确定是机器问题还是文件问题。 >> >> 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 >>> 经确认,私钥文件没有问题,且公钥可以正常导入。 >>> 请问这是什么原因,如何解决? >>> >>> >>> 感谢! >> >> >> >> -- >> 彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。 >> blog: http://shell909090.org/ >> twitter: @shell909090 >> about.me: http://about.me/shell909090 > > > > -- > 彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。 > blog: http://shell909090.org/ > twitter: @shell909090 > about.me: http://about.me/shell909090 -- /*** * @ 启智开源 编码自由 * @ 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 */