Enigmail, passphrase issue

This is a short post where I try to explain the steps i followed to fix the behavior of Enigmail on my machine.

In the last few weeks i wasn’t able to use any signing and encryption capabilities on my emails due to a problem that showed an unclear error message.

I don’t remember the cause of the issue but it is somehow related to a fresh install of my current operating system (Ubuntu). So every time i tried to sign a message, the following error message showed up: “Error – Bad passphrase”, even without inserting any password. I searched on the web to see if it was a common problem and most of the answers were related with the cache of “gpg-agent” and how to clean it. I tried most of the solutions without success.

It took a while until i found an entry in the support forum that allowed me to fix the issue.

So what happened?

After a fresh system install I had the wrong “pinentry” application set up (i still don’t know why “pinentry-qt4” didn’t work) and it was making Enigmail show the error without asking for the passphrase. After going through the following steps i was able to put everything working again.

  1. Set the pinentry symlink to the “pinentry-gtk-2” application:
    sudo ln -s -f /usr/bin/pinentry-gtk-2 /usr/bin/pinentry
  2. Edit  “~/.gnupg/gpg-agent.conf” and change the following line (if it exists):
    pinentry-program /usr/bin/pinentry-qt4

    to

    pinentry-program /usr/bin/pinentry-gtk-2
  3. Log out of your system session and log in again.

In the end it is easy to solve but it took me while until i found an answer that lead me in the right direction. So if you run into the same issue in the future i hope this might be useful to you and prevent you to waste a lot of time to solve it.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.