Loading...

Configuration examples for .gnupg/gpg.conf

Public Keys

  • 655685AC - GPF Crypto Stick
  • 5E396988 - GPG Smart Card
  • 34097C5C

Import from public server

gpg --keyserver x-hkp://pgp.mit.edu --recv-keys 5E396988

Default key

# If you have more than 1 secret key in your keyring, you may want to
# uncomment the following option and set your preferred keyid.

default-key 3072C7C4

Recipient

# If you do not pass a recipient to gpg, it will ask for one.  Using
# this option you can encrypt to a default key.  Key validation will
# not be done in this case.  The second form uses the default key as
# default recipient.

default-recipient 655685AC
#default-recipient-self

It won’t be necessary if above option is set.

# Use --encrypt-to to add the specified key as a recipient to all
# messages.  This is useful, for example, when sending mail through a
# mail client that does not automatically encrypt mail to your key.
# In the example, this option allows you to read your local copy of
# encrypted mail that you've sent to others.

encrypt-to 655685AC

Escape

# Because some mailers change lines starting with "From " to ">From "
# it is good to handle such lines in a special way when creating
# cleartext signatures; all other PGP versions do it this way too.

no-escape-from-lines

Charset

# If you do not use the Latin-1 (ISO-8859-1) charset, you should tell
# GnuPG which is the native character set.  Please check the man page
# for supported character sets.  This character set is only used for
# metadata and not for the actual message which does not undergo any
# translation.  Note that future version of GnuPG will change to UTF-8
# as default character set.  In most cases this option is not required
# as GnuPG is able to figure out the correct charset at runtime.

charset utf-8