Having done a fresh install I need to set this up again. We could do with an up to date guide. This might encourage more people to use encryption and signing.

I already have a keyring, but others need to know how to do that. That should probably be a separate question. I use KGPG to manage my keys.

In Kmail I know you need to set the default signing and encryption keys on your Identity.

When I try to sign an email it complains that signing failed without asking for my pass-phrase. What am I missing? How should I configure cryptography in Kmail?

  • What is the exact error when it fails? Aug 13 '10 at 12:44
  • Signing failed: Bad passphrase
    – steevc
    Aug 13 '10 at 15:47
  • Do you have pinentry (pinentry-qt4) installed? If so, by any chance does the password dialog pop up for a moment and immediately close itself once it gains focus?
    – David Z
    Aug 14 '10 at 8:45
  • did anyone happen to solve this? I have exactly the very same issue... Apr 25 '14 at 16:48

You need to put


in your ~/.gnupg/gpg.conf

I know because Seahorse used to put a blank file there and break things for people using GNOME & KDE together. I wrote the patch that made it properly copy the skeleton file, but that wasn't until 2009.

  • I've done that and gpg-agent is installed. How do I make sure it is running?
    – steevc
    Aug 13 '10 at 15:48
  • ps -ef | grep agent
    – maco
    Aug 13 '10 at 16:46
  • It's running. And I had pinentry-qt4 already.
    – steevc
    Aug 14 '10 at 18:54
  • Maybe I just needed another restart, but it's working now. Pinentry is popping up for my passphrase
    – steevc
    Aug 16 '10 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.