using "gpg --list-keys" and "gpg --list-secret-keys" as shown in the next image:
To export a key from the public ring to a plain text file use the option --output, the option --armor creates
a readable ASCII output, "god@spam.com" is the user id associated to the key.
a readable ASCII output, "god@spam.com" is the userid associated to the key.
To import keys to the public or private rings just use "gpg --import" the program will add it to the correct ring by the header of the key.
Key imported to the public ring withe the user id jesus@spam.com (It was generated with GPG For Windows) as shown in the next image:
Key imported to the private ring withe the user id jesus@spam.com (It was generated with GPG For Windows) as shown in the next image:
The next entry shows how to encrypt and decrypt with GPG: http://davidalexandermejia.blogspot.com/2014/04/encrypt-decrypt-using-gpg-to-encrypt.html