Enigmail没有要求pgp密码而是说没有密钥可用

使用thunderbird中的enigmail解密电子邮件不再有效。 这是因为我没有机会打入我的密码短语,一个要求我这样做的表格用来弹出,现在它不是,我收到这条消息:

错误 – 没有找到解密消息的匹配私钥/密钥; 单击“详细信息”按钮以获取更多信息

但私钥是可用的

gpg -d Desktop/mail.eml 

使表单出现。 填写我的密码后,我可以阅读终端内的解密邮件。

当我今天创建新密钥时,出现了关于密码短语问题的另一个提示。 我无法创建吊销证书,因为没有设置密码。 再次,这不是真的。

我在8月31日星期一首先发现了这个问题。

我检查了一下互联网,然后做了以下事情:

  1. 确保gpg-agent的实例正在运行:

     gpg-agent -v 

    回报

     gpg-agent: gpg-agent running and available 

    .gnupg / gpg-agent.conf的内容:

    default-cache-ttl 0
    max-cache-ttl 0

  2. 转到dconf Editor desktop->gnome->crypto->cache并将gpg-cache-ttl0

  3. Thunderbird Enigmail->Clear Saved Passphrases提供Enigmail警报说:

    您正在使用gpg-agent进行密码短语处理。 因此,无法在Enigmail中清除密码。

    Thunderbird Enigmail->Preferences->Basic Remember passphrase for 0 minutes of idle time

  4. gpg-agent忘记我的密码:

     pkill -SIGHUP gpg-agent 
  5. Seahorse->GnuPG keys删除所有键并重新导入它们

这个列表都没有对问题产生任何影响。 我想知道,我如何让Enigmail再次询问我的密码呢?

提前致谢!
布朗克

编辑

  1. 删除/etc/xdg/autostart/gnome-keyring-gpg.desktop没有做任何事情。
  2. 移除seahorse没有做任何事情。
  3. 使用decrypt-file

     Couldn't decrypt file: mail.eml.pgp Bad passphrase 

试试这个: https ://www.enigmail.net/support/gnupg2_issues.php在我的情况下,我需要安装一个granical版本的pinentry(pinentry-qt4包)。

“解决GnuPG 2.x和gpg-agent的问题

注意GnuPG 2.x需要一个“代理”来处理密码短语。 默认情况下,这由gpg-agent完成,但还有其他工具实现其function的子集。 这些说明仅适用于gpg-agent。 如果您使用gnome-keyring,seahorse-agent或KDE Wallet Manager等代理,则这些说明不适用。 最常见的问题

症状

最常见的问题是gpg-agent(GnuPG的一部分)无法启动pinentry(用于查询密码的工具)。 Enigmail会显示如下消息:

 when reading messages: Error - no matching private/secret key found to decrypt message; click on 'Details' button for more information when sending messages: - Send operation aborted. Error - encryption command failed - Send operation aborted. Key 0x....... not found or not valid. The (sub-)key might have expired 

如何分析

 Try sending a signed and unencrypted message to yourself. Check the output in the Enimgail log: go to menu Enigmail > Debugging Options > View Log. Search for the following text: parseErrorOutput: status message. You will probably find this message several times. Check what follows below. If the message says something like "no pinentry", "problem with the agent", "Invalid IPC response" or "problem with gpg-agent", then there is something wrong with your gpg-agent and/or pinentry setup. 

如何解决它

 Execute the following script from a terminal to find out if a graphical version of pinentry is used: pinentry < BYE gpg-agent[76993]: can't connect to the PIN entry module: IPC connect call failed gpg-agent[76993]: command get_passphrase failed: No pinentry Press Ctrl+D in the terminal to end the debugging session. The bold line should tell you the reason for the error (in the example above, pinentry cannot be found). Try to fix the error and repeat the test." 

我遇到了同样的问题,但发现杀死gpg-agent是一个问题。

(从源代码中我发现你可以通过编辑〜/ .thunderbird下的“defaults / preferences / enigmail.js”文件启用enigmail日志记录,将“extensions.enigmail.logDirectory”属性设置为“/ tmp”。日志文件“/tmp/enigdbug.txt”然后显示了enigmail正在运行的完整gpg命令,以“–use-agent”结尾。我从命令行运行gpg命令,为其提供加密的电子邮件消息。抱怨错误消息“gpg:代理问题:没有PINentry”。搜索该错误消息时出现了杀死gpg-agent的建议。同时,NSA高兴地嘲笑PKI加密的用户体验是所以垃圾。)

我有类似的问题。 Thunderbird一次又一次地要求输入我的密钥密码而Gnome密钥环不会记住它,尽管我问过它。 问题是, gpg-agent没有在我的会话中运行。 当我在当前会话中手动启动它时问题消失了:

 gpg-agent --debug-level expert --use-standard-socket --daemon /bin/sh 

要永久解决问题,您必须确保代理在会话中运行:1。检查您是否有以下文件/etc/X11/Xsession.d/90gpg-agent 。 我看起来像这样:

  : ${GNUPGHOME=$HOME/.gnupg} GPGAGENT=/usr/bin/gpg-agent PID_FILE="$GNUPGHOME/gpg-agent-info-$(hostname)" if grep -qs '^[[:space:]]*use-agent' "$GNUPGHOME/gpg.conf" "$GNUPGHOME/options" && test -x $GPGAGENT && { test -z "$GPG_AGENT_INFO" || ! $GPGAGENT 2>/dev/null; }; then if [ -r "$PID_FILE" ]; then . "$PID_FILE" fi # Invoking gpg-agent with no arguments exits successfully if the agent # is already running as pointed by $GPG_AGENT_INFO if ! $GPGAGENT 2>/dev/null; then STARTUP="$GPGAGENT --daemon --sh --write-env-file=$PID_FILE $STARTUP" fi fi 
  1. 检查你有~/.gnupg/gpg.conf文件,至少包含以下行:

     use-agent 

如果没有,您可以使用以下命令添加它:

 echo "use-agent" >> ~/.gnupg/gpg.conf 

关于pinentry有同样的错误。 最后,我发现gpg-agent使用了错误的pinentry。 通过编辑〜/ .gnupg / gpg-agent.conf并添加以下行来设置正确的pinentry来解决它

 pinentry-program /usr/bin/pinentry-gtk-2 

我正在使用的系统的默认值是pinentry-x11(这是一个允许各种窗口管理器的公司范围的安装),这对gnome3不起作用。 – 因此,必须确保gpg-agent正在使用正确的pinentry用于正在使用的实际窗口管理器。

在我的情况下,除了pinentry-curses (带指针支持的命令行)之外,我没有任何pinentry工具。 因此在Fedora中安装任何这些密码/ PIN输入对话框:

  • pinentry-qt.x86_64基于Qt4;
  • pinentry-gtk.x86_64基于GTK +;
  • 用于emacs的pinentry-emacs.x86_64 ;
  • 用于GNOME 3的pinentry-gnome3.x86_64

我使用了GNOME 3 pinentry包。

在thunderbird中,选择消息,单击汉堡包,展开Enigmail菜单并选择解密/validation。 您将获得密码提示,之后将解密该消息。

我有类似的问题! 完成gpg-agent调试后:

 gpg-agent --debug-level expert --use-standard-socket --daemon /bin/sh 

我发现enigmail和gpg之间的某些东西被打破了,它从来没有要求过密码。 但是在预装密码的情况下,所有工作都完美无缺。

在我的情况下问题是什么,在过去,我强制在〜/ .gnupg / gpg.conf中的跟随选项

 pinentry-mode loopback 

这打破了这个过程。 您可以在Enigmail中检查运行enigmail的命令以启用专家模式,然后在“调试选项 – >查看控制台”中查看

评论并且一切正常。