Skip to content

Instantly share code, notes, and snippets.

@Silvenga
Created April 1, 2024 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Silvenga/fb88de91c64e0f293f2dab596c84f082 to your computer and use it in GitHub Desktop.
Save Silvenga/fb88de91c64e0f293f2dab596c84f082 to your computer and use it in GitHub Desktop.

Enable GPG signing by default:

git config --global commit.gpgsign true
git config --global gpg.program (Get-Command gpg).Source

git config --global --unset gpg.format 

gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey B862284A2975BD3B!

Install GPG for Windows:

winget install GnuPG.Gpg4win

Import the private and public keys:

gpg --import .\B862284A2975BD3B.gpg

Note, that for me, my primary key is DC85D5DF95F8694, so the above command is importing my sub-key private key B862284A2975BD3B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment