Forrest logo
back to the gpg tool

gpg:tldr:1417a

gpg: Export private key for alice@example.com (output to `stdout`).
$ gpg --export-secret-keys --armor ${alice@example-com}
try on your machine

This command exports the secret key of a user named "alice@example-com" using GPG (GNU Privacy Guard) and saves it in ASCII armored format.

Let's break it down:

  • gpg is the command for interacting with GPG, a software tool used for encryption and signing of data.

  • --export-secret-keys is an option that instructs GPG to export the specified user's secret keys. Secret keys are used for decryption and signing of data. By default, GPG exports public keys, which are used for encryption and verification.

  • --armor is another option that tells GPG to export the secret key in ASCII armored format. ASCII armored format is a textual representation of binary data, which makes it easier to transmit and share the exported key.

  • ${alice@example-com} is a placeholder that represents the user's ID or email address associated with the secret key. You would replace this with the actual ID or email address of the user you want to export the secret key for.

In summary, running this command exports the secret key of the specified user, "alice@example-com," using GPG and saves it in a textual, easy-to-share format.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gpg tool