Skip to content

Instantly share code, notes, and snippets.

@michaelsauter
Created November 10, 2014 04:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsauter/cfc3ca4b0ae93104d3a9 to your computer and use it in GitHub Desktop.
Save michaelsauter/cfc3ca4b0ae93104d3a9 to your computer and use it in GitHub Desktop.
gnupg

Encrypt file:

gpg --encrypt --armor --recipient email@example.com file

Decrypt file:

gpg --decrypt file

Export public key:

gpg --export --armor email@example.com > public.key

Import public key:

gpg --import public.key

Export private key:

gpg --export-secret-key --armor email@example.com > private.key

Import private key:

gpg --allow-secret-key-import --import private.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment