GPG (GNU Privacy Guard) - Export certificates from a keyring (--armor --export)

by
Jeremy Canfield |
Updated: August 15 2021
| GPG (GNU Privacy Guard) articles
The gpg command with the --armor and --export flags can be used to display the public certificates in a GPG keyring.
[root@server1 ~]# gpg --armor --export john.doe@example.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGEYEa0BDADfmXgtggcoQqtl90uS9z9PTZRECTITVj5/u1wAZrhGiosf7Cj5
eYTOUo5Gch/hrLJCoVCXrXm3Jiuo97EcB7eXSrAIffjM4/c7j0LbiyuOwj6Cffpx
cvJu0z8kMgk0jK1bPqh+iAWPTyEowqjJs6QVbPRK30QN0+oQ25EQ8g5hF7EKl...
-----END PGP PUBLIC KEY BLOCK-----
The --output option can be used to create a file that contains the public certificate.
[root@server1 ~]# gpg --output cert.gpg --armor --export john.doe@example.com
Did you find this article helpful?
If so, consider buying me a coffee over at