Skip to content

Instantly share code, notes, and snippets.

@entrity
Created July 14, 2018 19:40
Show Gist options
  • Save entrity/5f33790070ba0fa8483d36f53f13b6ee to your computer and use it in GitHub Desktop.
Save entrity/5f33790070ba0fa8483d36f53f13b6ee to your computer and use it in GitHub Desktop.
GPG Quick Start

Create a key pair and export the public key

gpg --gen-key # To create your key
gpg --export <your_id> > hazel-public.asc # To export your key to a file

Import someone else's public key. Sign and encrypt a file for them.

gpg --import mkim-gpg-pubkey # To import my key
gpg -s -e -r "M Kim" <file_to_encrypt> # To sign and encrypt a file

Decrypt a file that was encrypted for you

gpg -d <file_to_decrypt> # To decrypt a file that was encrypted for any of your private keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment