Skip to content

Instantly share code, notes, and snippets.

@Fake51
Last active December 28, 2018 13:44
Show Gist options
  • Save Fake51/9b423bed2b64d428fec5935083ffb60e to your computer and use it in GitHub Desktop.
Save Fake51/9b423bed2b64d428fec5935083ffb60e to your computer and use it in GitHub Desktop.
GPG gems
## use gpg2 instead of gpg
alias gpg=gpg2
## import key
gpg --import <keyfile>
## export public key
gpg --export --armor --output <outputfile> <key>
## export private key
gpg --export-secret-keys --armor --output <outputfile> <key>
## encrypt file
gpg -e --recipient <pubkey uid> --output <outputfile> <inputfile>
## search for a public key
gpg [--keyserver <server>] --search-keys <search string>
## sign public key with default private key to indicate trust
gpg --sign-key <key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment