Recipe 7.10 Adding Keys to Your Keyring

7.10.1 Problem

You want to add a public or secret key to your keyring.

7.10.2 Solution

If the public key is in the file keyfile:

$ gpg --import keyfile

If the secret key is in the file keyfile:

$ gpg --import --allow-secret-key-import keyfile

7.10.3 Discussion

Importing the secret key implicitly imports the public key as well, since the public key is derivable from the secret one.

7.10.4 See Also

gpg(1).



    Chapter 9. Testing and Monitoring