gpg --export --armor john@example.com > john_doe.pub
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGiBEm7B54RBADhXaYmvUdBoyt5wAi......=vEm7B54RBADh9dmP
-----END PGP PUBLIC KEY BLOCK-----
About the arguments:
While Phive will support fetching keys from other sources soon, for now uploading your key to keys.openpgp.org is recommend.
Phive checks the modern pool provided by openpgp.org first, only supporting the legacy keyservers as a fallback.
While you of course can upload your public key to both pools, for phive to find it uploading to one is sufficient.
Please note: The legacy servers sks-keyserver pool has ceased operation. If you did not yet upload your public key to keys.openpgp.org, please do so now.
If not found at the aformentioned server, at the time of this writing, phive also checks the keyservers operated by canonical/ubuntu and the MIT.
Important: keys.openpgp.org strips the UID from the key until ownership is confirmed. The key is useless when no UID is included so make sure you follow the instructions sent to you by openpgp.org.
Please allow a couple of minutes for the servers to replicate that information before starting to use the key.
gpg --keyid-format LONG --list-keys john@example.com
pub rsa4096/ABCDEF0123456789 2018-01-01 [SCEA] [expires: 2021-01-01]
ABCDEF0123456789ABCDEF0123456789
uid [ ultimate ] John Doe <john@example.com>
This shows the 16-byte Key-ID right after the key-type and key-size. In this example it's the highlighted part of this line:
pub rsa4096/ABCDEF0123456789 2018-01-01 [SCEA] [expires: 2021-01-01]
The next step is to use this Key-ID to send it to the keyserver, in our case the MIT one.
gpg --keyserver keyserver.ubuntu.com --send-keys ABCDEF0123456789
Please allow a couple of minutes for the servers to replicate that information before starting to use the key.