Skip to content

In case git forgets what gpg key it should be using

License

Notifications You must be signed in to change notification settings

raiden-e/set-git-gpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

In case git forgets what gpg key it should be using

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks