KMail: “Signing failed: Bad passphrase” message in Debian 6 Squeeze KDE

I was recently trying to setup automatic signing of messages in KMail and I hit a problem : each time I am sending something, I got the message “Signing failed: Bad passphrase” without any opportunity to enter passphrase for my private key. It looks like this:

 

It seems like you have to specify proper path to pinentry-program in your configuration. Do the following:

1. Find out the exact path to pinentry-gtk-2:

$ whereis pinentry-gtk-2 
pinentry-gtk-2: /usr/bin/pinentry-gtk-2 /usr/share/man/man1/pinentry-gtk-2.1.gz

As you can see, in my case the path is /usr/bin/pinentry-gtk-2

2. Edit file ~/.gnupg/gpg.conf by uncommeting # use-agent so it becomes use-agent

3. Create file ~/.gnupg/gpg-agent.conf and put into the path to pinentry-gtk-2. Here is content of my ~/.gnupg/gpg-agent.conf:

$ more ~/.gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-gtk-2

Make sure that you put the proper path (the one from Step 1)

4. Reboot machine and try to send something from KMail. It should work now.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Identify yourself * Time limit is exhausted. Please reload CAPTCHA.