I have a gpg key without password. In mutt I set the config to sign all the messages. But every time I send a message "Enter PGP passphrase". How can I get rid of it. Here is the config for the command:

set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
  • 1
    Is set pgp_default_key or set pgp_sign_as defined in your .muttrc file ? What is your version of GnuPG ?
    – Kate
    Dec 3, 2019 at 22:17
  • @Anonymous No, they are not defined. How to define them for an empty key? gpg (GnuPG) 1.4.23
    – user4035
    Dec 4, 2019 at 12:00
  • I have a couple ideas, but does Mutt send the message as expected if you enter a blank passphrase ?
    – Kate
    Dec 4, 2019 at 20:48
  • @Anonymous Yes.
    – user4035
    Dec 5, 2019 at 5:09

1 Answer 1


If you only want to sign messages but not encrypt them you would need to set this option: pgp_default_key or: pgp_sign_as.

From the mutt manual:

9.1. OpenPGP Configuration

The two most important settings are $pgp_default_key and $pgp_sign_as. To perform encryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $pgp_default_key.

Also note this remark regarding version of GnuPG:

Starting with version 2.1.0, GnuPG automatically uses an agent to prompt for your passphrase. If you are using a version older than that, you'll need to ensure an agent is running (alternatively, you can unset $pgp_use_gpg_agent and Mutt will prompt you for your passphrase). The agent in turn uses a pinentry program to display the prompt. There are many different kinds of pinentry programs that can be used: qt, gtk2, gnome3, fltk, and curses. However, Mutt does not work properly with the tty pinentry program. Please ensure you have one of the GUI or curses pinentry programs installed and configured to be the default for your system. ...

The repeated prompt for passphrase makes me thing GPG agent is lacking. In your case, I'd check the version of Gnupg and preferably use Gnupg2. It's possible both are already installed on your system but v1 is still default, check with gpg --version.

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.