Created
January 2, 2018 06:50
-
-
Save k37y/380d6b1240f890f156f1d70e313465a3 to your computer and use it in GitHub Desktop.
Useful Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to create a key: | |
gpg --gen-key | |
to export a public key into file public.key: | |
gpg --export -a "User Name" > public.key | |
to export a private key: | |
gpg --export-secret-key -a "User Name" > private.key | |
to import a public key: | |
gpg --import public.key | |
to import a private key: | |
gpg --allow-secret-key-import --import private.key | |
to delete a public key (from your public key ring): | |
gpg --delete-key "User Name" | |
to delete an private key (a key on your private key ring): | |
gpg --delete-secret-key "User Name" | |
To list the keys in your public key ring: | |
gpg --list-keys | |
To list the keys in your secret key ring: | |
gpg --list-secret-keys | |
To generate a short list of numbers that you can use via an alternative method to verify a public key, use: | |
gpg --fingerprint > fingerprint | |
To encrypt data, use: | |
gpg -e -u "Sender User Name" -r "Receiver User Name" somefile | |
To decrypt data, use: | |
gpg -d mydata.tar.gpg | |
gpg --edit-key | |
gpg --gen-revoke | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment