Last active
December 4, 2020 07:34
-
-
Save adrianriobo/4f50554824b1fb451531b16af0afc0d6 to your computer and use it in GitHub Desktop.
gpg management
This file contains 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
# Generate gpg use same email as verified account on Git | |
gpg --full-generate-key | |
# Get keys info | |
gpg --list-secret-keys --keyid-format LONG | |
# Upload key to server and sign to verify | |
gpg --export your@email.com | curl -T - https://keys.openpgp.org | |
# Configure to work with keyserver | |
echo "keyserver hkps://keys.openpgp.org" | tee -a ~/.gnupg/gpg.conf | |
# Verify / Retrieve public key for user (email) | |
gpg --auto-key-locate keyserver --locate-keys your@email.com | |
# Send public key to server | |
gpg --keyid-format long --list-keys your@example.com | |
gpg --keyserver pool.sks-keyservers.net --send-key KEY_ID | |
# Decrypt a message | |
gpg --output decrypted-doc --decrypt doc-to-decrypt.gpg | |
# Export in text | |
gpg --armor --export your@email.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment