Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 373 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 373 Bytes

Set Git GPG

In case git forgets what gpg key it should be using.

Run like so:

.\set_git_gpg.ps1

Does the following:

git config --global gpg.program "${env:ProgramFiles(x86)}\gnupg\bin\gpg.exe"
$key = gpg --list-secret-keys --keyid-format LONG
$key = $key[2].substring($key[2].indexOf("/") + 1, 16)
git config --global user.signingkey $key
$key