升级到Ubuntu 15.10后,GPG-Agent / Enigmail停止工作
今天是个好日子,
我刚刚使用Software Updater升级到Ubuntu 15.10。 重新启动后,我意识到Thunderbird(版本38.3.0)中的Enigmail(版本1.2.8。)已停止工作。 我无法签名或加密邮件。
当Enigmail使用gpg(GnuPG)1.4.18时,按下发送按钮后会立即出现以下错误窗口:
Send operation aborted. Error - bad passphrase
我从来没有得到对话框来输入密码。 为了测试我安装了gpg(GnuPG)2.0.28,重新安装了Enigmail并将其配置为使用gpg2。 在首选项 – >基本设置中调整设置时,出现以下错误:
Cannot connect to gpg-agent. Maybe your system uses a specialized tool for passphrase handling (eg gnome-keyring, seahorse-agent, KDE wallet manager, ...). Unfortunately Enigmail cannot control the passphrase timeout for the tool you are using. Therefore the respective timeout settings in Enigmail are disregarded.
当尝试使用gpg2发送签名或加密的邮件时,我收到不同的错误消息:
Send operation aborted. Key 0xXXXXXXXX not found or not valid. The (sub-)key might have expired
那明显是错的。 密钥存在且未过期。 奇怪的是,Enigmail密钥管理器确实正确显示了密钥。
基本问题似乎与gpg-agent(gpg-agent(GnuPG)2.0.28)有关。 检查代理是否正在运行:
> ps ax | grep gpg 6971 ? Ss 0:00 gpg-agent --daemon
试图连接:
> gpg-agent gpg-agent: can't connect to the agent: IPC connect call failed > sudo gpg-agent gpg-agent: no gpg-agent running in this session
试图签署文件:
> gpg -s test.txt [user and key info] can't connect to `/tmp/gpg-GBtHXS/S.gpg-agent': No such file or directory gpg: can't connect to `/tmp/gpg-GBtHXS/S.gpg-agent': connect failed
TL; DR;
显然gpg-agent不再工作了。 我的问题是:
- 为什么gpg-agent不再工作了?
- 怎么解决这个问题?
感谢大家的时间和见解。
软件版本摘要:
- gpg(GnuPG)1.4.18
- gpg(GnuPG)2.0.28
- gpg-agent(GnuPG)2.0.28
- Enigmail 1.2.8。
- 雷鸟38.3.0
- Ubuntu 15.10狡猾的狼人
我遇到了类似的问题并通过安装pinentry-gnome3解决了这个问题(我使用的是Gnome Shell,而不是Unity):
sudo apt-get install pinentry-gnome3
我让它再次部分工作了。 对于任何感兴趣的人,这就是我所做的。
- 删除了Enigmail
- 删除了GPG2
- 重启
- 重新安装GPG2
- 重新安装并配置Enigmail
- 重启
加密现在像以前一样工作。 但是,邮件签名仍然失败,并显示以上错误消息(密钥无效…)。
GPG代理现在可以从命令行按预期工作。 Enigmail仍然没有提示我输入密码,但仍然会报告密钥丢失或无效。
编辑:改变了答案,因为它还为时过早
通过添加解决了这个问题
use-agent
到.gnupg/gpg.conf
安装后,gpg-agent默认没有运行。