Попробуйте это: https://www.enigmail.net/support/gnupg2_issues.php В моем случае, я должен установить графическую версию pinentry (pinentry-qt4 пакет).
«Решающие вопросы с GnuPG 2.x и gpg-агентом
GnuPG 2.x Примечания требует, чтобы «агент» обращался с паролями. По умолчанию это сделано gpg-агентом, но есть другие инструменты, осуществляющие подмножество его функциональности. Эти инструкции для gpg-агента только. Если Вы используете агента как брелок для ключей гнома, агента морского конька или менеджера по Кошельку KDE, то эти инструкции не применяются. Наиболее распространенная проблема
Признаки
наиболее распространенная проблема - то, что gpg-агент (часть 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 <<EOT
SETDESC Hello World
CONFIRM
EOT
You should get a graphical window with a confirmation message "Hello World". If a "window" is opened within your terminal window then pinentry is text-based, which does not work with Enigmail. To fix this, ensure that a graphical version of pinentry is installed. On Linux/Unix systems, these would typically be pinentry-qt/pinentry-qt4 or pinentry-gtk/pinentry-gtk2, and on Mac OS X pinentry-mac. Rename the existing pinentry file to "pinentry-text" or similar, and create a symlink from pinentry-qt, pinentry-qt4, pinentry-gtk, pinentry-gtk2 or pinentry-mac to pinentry. Then restart your PC.
If the above does not help, check the contents of $HOME/.gnupg/gpg-agent.conf. Make sure that there is a configuration entry pinentry-program containing the full path to a graphical version of pinentry as above. E.g.:
pinentry-program /usr/local/bin/pinentry-gtk
Then save the file and restart your PC.
If you still can't access your key, then execute the following script from a terminal:
gpg-connect-agent <<EOT
GETINFO version
EOT
The output should be something like the text below, where 2.0.26 represents the agent version number. The version number should match your gpg version number:
D 2.0.26
OK
If you get an error message like "ERR 280 not implemented" then you don't use gpg-agent, but one of the alternatives like gnome-keyring. We recommend you switch to gpg-agent by disabling your current agent. See e.g. askubuntu for how to disable gnome-keyring or how to disable KDE wallet.
If you get a useful result from above, then execute the following script from a terminal:
gpg-connect-agent <<EOT
GET_CONFIRMATION Hello
EOT
Pinentry should now open as a graphical window (just like above), with the difference to the step above that this instance of pinentry was launched from gpg-agent. If this is successful, then GnuPG 2 should work correctly in Enigmail.
If gpg-agent still cannot launch pinentry from Enigmail, then you need to start debugging gpg-agent. Execute the following commands from a terminal:
killall gpg-agent
gpg-agent --debug-level expert --use-standard-socket --daemon /bin/sh
This will start gpg-agent from the command line, open a new shell and print the debug output to that shell. If the command succeeded, you will see somehting like:
gpg-agent[76979]: gpg-agent 2.0.26 started
Leave the terminal window untouched, start Thunderbird and try to use Enigmail. As you'll try to access gpg-agent, you will see the output in your terminal window. If gpg-agent cannot start pinentry successfully, you will see something like this:
gpg-agent[76993]: starting a new PIN Entry
gpg-agent[76993]: chan_19 <- ERR 67109133 can't exec `/usr/bin/pinentry': No such file or directory
gpg-agent[76993]: chan_19 -> 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-агента было workround.
(От исходного кода я нашел, что можно включить вход enigmail путем редактирования "defaults/preferences/enigmail.js" файла где-нибудь под ~/.thunderbird, установки "extensions.enigmail.logDirectory" свойства на "/tmp". Файл журнала "/tmp/enigdbug.txt" затем показал, что полные gpg управляют, чтобы enigmail работал, заканчиваясь "-агент использования". Я выполнил это команда gpg от командной строки, подав его зашифрованное электронное письмо. Это жаловалось с сообщением об ошибке "gpg: проблема с агентом: Никакой PINentry". Поиск с помощью Google для того сообщения об ошибке поднял предложение для уничтожения gpg-агента. Между тем NSA потирает руки в ликовании, что пользовательский опыт шифрования PKI является так мусором.)
gpg -d message.eml
шляпа та же проблема: gpg: public key decryption failed: No passphrase given
- не прося у меня пароль
– Dan Brough
14.07.2017, 08:10
Получил ту же ошибочную ошибку о pinentry. В конце я выяснил, что gpg-агент использовал несправедливость pinentry. Решенный это путем установки права pinentry путем редактирования ~/.gnupg/gpg-agent.conf и добавления следующей строки
pinentry-program /usr/bin/pinentry-gtk-2
Значение по умолчанию для системы, в которой я работаю, было pinentry-x11 (это - общекорпоративная установка, которая позволяет множество менеджеров окон), который не работал на gnome3. - Таким образом, нужно удостовериться, что gpg-агент использует корректный pinentry для фактического используемого менеджера окон.
У меня была подобная проблема. 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
Проверка у Вас есть файл ~/.gnupg/gpg.conf
по крайней мере, со следующей строкой:
use-agent
В противном случае можно добавить его со следующей командой:
echo "use-agent" >> ~/.gnupg/gpg.conf
use-agent
больше не нужно в OpenGPG 2.1 - агент используется в любом случае.
– Psyx
12.07.2017, 08:19
В моем случае это было просто, что у меня не было никакого pinentry
инструменты за исключением pinentry-curses
(командная строка с поддержкой указателя). Таким образом в Fedora устанавливают любое из этих диалоговых окон ПАРОЛЯ/ВВОДА PIN-КОДА:
pinentry-qt.x86_64
на основе Qt4; pinentry-gtk.x86_64
на основе GTK +; pinentry-emacs.x86_64
для emacs; pinentry-gnome3.x86_64
для GNOME 3. я использовал пакет GNOME 3 pinentry
.
В тандерберде выберите сообщение, нажмите на гамбургер, разверните меню Enigmail, и выбор дешифруют/проверяют. Вы получите подсказку пароля, после которой будет дешифровано сообщение.