Created
May 10, 2022 22:08
-
-
Save cppshane/5ac71a7172d55fe36d9f801474f01c03 to your computer and use it in GitHub Desktop.
Import/Export GPG Keys
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
# Get GPG keys | |
# | |
# Sample Output: | |
# sec rsa3072 2021-11-12 [SC] [expires: 2023-11-12] | |
# 12345ABCDE | |
# uid [ultimate] Shane Duffy <[email protected]> | |
# ssb rsa3072 2021-11-12 [E] [expires: 2023-11-12] | |
gpg --list-secret-keys [email protected] | |
# Export GPG key to file | |
gpg --export-secret-keys 12345ABCDE > private-gpg.key | |
# Import GPG key from file | |
gpg --import private-gpg.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment