Skip to content

Instantly share code, notes, and snippets.

@tomisme tomisme/
Last active Feb 23, 2016

What would you like to do?
Handy gpg(1) commands
# encrypt message stored in a file and print to stdout
gpg -a -o - -r RECIPIENT -e INPUT_FILE
# decrypt message from clipboard
xclip -o | gpg -d
# import public/private keys from clipboard
xclip -o | gpg --import
# delete public key
gpg --delete-key NAME
# export a private key to file
gpg -a --export-secret-keys USERNAME > OUTPUT_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.