export gpg key to server code example Example: How to export a GPG public key to a file gpg --output public.pgp --armor --export username@email