Last active
August 5, 2024 11:05
-
-
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
# Get ID | |
gpg --auto-key-locate keyserver --locate-keys [email protected] | |
# Export | |
gpg -ao mypub.key --export <MY_KEY_ID> | |
gpg -ao myprivate.key --export-secret-keys <MY_KEY_ID> | |
# Import | |
gpg --import myprivate.key | |
gpg --import mypub.key |
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 [email protected] | 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 [email protected] | |
# Send public key to server | |
gpg --keyid-format long --list-keys [email protected] | |
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 [email protected] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment