升级到 Ubuntu 15.10 后 GPG-Agent / Enigmail 停止工作

T32*_*2ET 7 gnupg enigmail

今天是个好日子,

我刚刚使用软件更新程序升级到 Ubuntu 15.10。重新启动后,我意识到 Thunderbird(38.3.0 版)中的 Enigmail(1.2.8 版)停止工作。我无法签署或加密邮件。

当 Enigmail 使用 gpg (GnuPG) 1.4.18 时,按下发送按钮后会立即出现以下错误窗口:

Send operation aborted.
Error - bad passphrase
Run Code Online (Sandbox Code Playgroud)

我什至从来没有得到输入密码的对话框。为了测试,我安装了 gpg (GnuPG) 2.0.28,重新安装了 Enigmail 并将其配置为使用 gpg2。在 Preferences -> Basic Settings 中调整设置时出现以下错误:

Cannot connect to gpg-agent.
Maybe your system uses a specialized tool for passphrase handling
(e.g. 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.
Run Code Online (Sandbox Code Playgroud)

尝试使用 gpg2 发送签名或加密的邮件时,我收到一条不同的错误消息:

Send operation aborted.
Key 0xXXXXXXXX not found or not valid.
The (sub-)key might have expired
Run Code Online (Sandbox Code Playgroud)

那明显是错的。密钥存在且未过期。奇怪的是,Enigmail 密钥管理器确实正确显示了密钥。

潜在的问题似乎与 gpg-agent (gpg-agent (GnuPG) 2.0.28) 有关。检查代理是否正在运行:

> ps ax | grep gpg
6971 ?        Ss     0:00 gpg-agent --daemon
Run Code Online (Sandbox Code Playgroud)

尝试连接:

> 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
Run Code Online (Sandbox Code Playgroud)

尝试签署文件:

> 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
Run Code Online (Sandbox Code Playgroud)

TL; 博士;

显然 gpg-agent 不再工作了。我的问题是:

  • 为什么 gpg-agent 不再工作了?
  • 如何解决这个问题?

感谢大家的时间和洞察力。

软件版本汇总:

  • gpg (GnuPG) 1.4.18
  • gpg (GnuPG) 2.0.28
  • gpg-agent (GnuPG) 2.0.28
  • 密信 1.2.8。
  • 雷鸟 38.3.0
  • Ubuntu 15.10 狡猾的狼人

小智 5

我遇到了类似的问题并通过安装 pinentry-gnome3 解决了它(我使用的是 Gnome Shell,而不是 Unity):

sudo apt-get install pinentry-gnome3
Run Code Online (Sandbox Code Playgroud)