I used GnuPG to generate a key. But looking at the GUI, I cannot tell where my public key is stored. I would like to share it with friends.
I clicked on export, this exported a name.asc file, but when I open the file in gedit it is labeled as a private key so I am assuming this is not the public key for sharing.
Best Answer
From the command line:
Run
gpg --list-keys 'your name'
to list the keys you currently have (replacingyour name
with the name you have while setting up):Note the fingerprint of the key you want to export. The fingerprint of my public key is
AD0CC9B4
. To export it, I'll dogpg --export
(-a
is for ASCII armour, so that the key is in the usual base64-encoded form):You can redirect the output to a file:
Then
my-pubkey.asc
should contain your ASCII-armoured public key.The corresponding private key can be exported with:
The output of this command will begin with