Skip to content

Instantly share code, notes, and snippets.

@masnick
Created October 26, 2012 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masnick/3958286 to your computer and use it in GitHub Desktop.
Save masnick/3958286 to your computer and use it in GitHub Desktop.
PGP cheat sheet

Install GPG (Mac only)

brew install gpg

Sending encrypted text

  1. Save your secret stuff to encrypted.txt.

  2. Add my public key to your gpg keyring:

    curl https://raw.github.com/gist/3958250/55c2f988f9f8b46ccacc2b42bdd2645a6ee60da4/gistfile1.txt > ~/Desktop/masnick.pgp
    
    gpg --import ~/Desktop/masnick.pgp
    
  3. Encrypt encrypted.txt:

    gpg -e -r A3BB696F ~/Desktop/encrypted.txt
    

    (# Say y at the security prompt.)

  4. You can safely email ~/Desktop/encrypted.txt.gpg to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment