Created
May 10, 2022 23:12
-
-
Save cppshane/a26dde07705221f6657faa20a0285a29 to your computer and use it in GitHub Desktop.
Git GPG Setup
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 key and list them | |
# Sample Output: | |
# /home/shane/.gnupg/pubring.kbx | |
# ------------------------------ | |
# sec rsa3072/12345ABCDE 2021-11-12 [SC] [expires: 2023-11-12] | |
# 123456789 | |
# uid [ultimate] Shane Duffy <shane@shaneduffy.io> | |
# ssb rsa3072/12345ZZZZZ 2021-11-12 [E] [expires: 2023-11-12] | |
gpg --gen-key | |
gpg --list-secret-keys --keyid-format LONG | |
# Export key to file, add result to GitHub | |
gpg --armor --export 12345ABCDE gpg-key.txt | |
# Set as signing key | |
git config --global user.signingkey 12345ABCDE | |
git config --global commit.gpgsign true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment