Setup and Using GPG (GnuPG)
for further information see
for e.g.:

Import a key from somebody else using a textfile

gpg --import key.asc

Check fingerprint

List all imported keys with their fingerprints:

gpg --fingerprint

Sign someones public key

To accept other's messages as authentic you have to sign them (for example when getting the message "There is no assurance this key belongs to the named user"):

gpg --sign-key <user-id>
# <user-id> might be the id of the key:
gpg --sign-key 4CD35F64

Building the web of trust - update signed keys of others on the keyserver and

gpg --keyserver --send-key 4CD35F64
# or send all keys to the keyserver:
gpg --keyserver --send-keys

To specify how much you trust the signing decisions of others, run from time to time:

gpg --update-trustdb

Using the Configuration File ~/.gnupg/gpg.conf

The config file ~/.gnupg/gpg.conf makes it easy to save your preferences. Options that you would add to the gpg command on the command line can be set in this configuration file (omit the leading -- for the command line options). Here is an example for Linux that I found here:

keyring ~/.gnupg/pubring.gpg
secret-keyring ~/.gnupg/secring.gpg
default-key A1A2A3A4
encrypt-to B1B2B3B4
keyserver x-hkp://
keyserver-options auto-key-retrieve,verbose
display-charset utf-8