Importing a Public Key to a GPG Keyring

The GPG public key repository is called a “keyring.” The keyring contains your private key (or multiple private keys), plus all of the public keys of individuals you wish to communicate with. To add a public key to your keyring, you generally obtain a text file that contains the public key. If, for example, the file were named andy_oram_oreilly.asc, you would issue the following command:

$ gpg --import andy_oram_oreilly.asc

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.