Next: , Previous: , Up: Top   [Contents][Index]

Appendix A GnuPG and EasyPG Assistant Configuration

If the auth-sources variable contains ~/.authinfo.gpg before ~/.authinfo, the auth-source library will try to read the GnuPG encrypted .gpg file first, before the unencrypted file.

In Emacs 23 or later there is an option auto-encryption-mode to automatically decrypt *.gpg files. It is enabled by default. If you are using earlier versions of Emacs, you will need:

(require 'epa-file)

If you want your GnuPG passwords to be cached, set up gpg-agent or EasyPG Assistant (see (epa)Caching Passphrases).

To quick start, here are some questions:

  1. Do you use GnuPG version 2 instead of GnuPG version 1?
  2. Do you use symmetric encryption rather than public key encryption?
  3. Do you want to use gpg-agent?

Here are configurations depending on your answers:

YesYesYesSet up gpg-agent.
YesYesNoYou can’t, without gpg-agent.
YesNoYesSet up gpg-agent.
YesNoNoYou can’t, without gpg-agent.
NoYesYesSet up elisp passphrase cache.
NoYesNoSet up elisp passphrase cache.
NoNoYesSet up gpg-agent.
NoNoNoYou can’t, without gpg-agent.

To set up gpg-agent, follow the instruction in GnuPG manual (see (gnupg)Invoking GPG-AGENT).

To set up elisp passphrase cache, set epa-file-cache-passphrase-for-symmetric-encryption.