Skip to content

Instantly share code, notes, and snippets.

@JensForstmann
Forked from xavierfoucrier/gpg-signing.md
Last active November 29, 2023 02:03
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JensForstmann/c38c322d9159cb8ab8ae9e9edbf3b1fc to your computer and use it in GitHub Desktop.
Save JensForstmann/c38c322d9159cb8ab8ae9e9edbf3b1fc to your computer and use it in GitHub Desktop.
GPG signing with Git and Github Desktop (for Windows)

Hi Windows users,

I can now sign my commits on Github using Git 2.18.0 and Github Desktop 1.6.1.

Here is what I have done:

[user]
	name = Jens Forstmann
	email = 19289807+JensForstmann@users.noreply.github.com
	signingkey = C43831562AA73BB1
[gpg]
	program = "C:\\Program Files\\Git\\usr\\bin\\gpg.exe"
[commit]
	gpgsign = true
[tag]
	gpgsign = true

this file is located in the %USERPROFILE% directory, ie: C:\Users\Jens\.gitconfig

YOUR_SIGNING_KEY should follow the GPG key ID convention, like this example: https://help.github.com/articles/telling-git-about-your-signing-key

After a git commit yout can verify the signing with git log --show-signature.

That's all folks! 🎉

@marchershey
Copy link

Don't ask how I found this, because I really don't know... but I just wanted to say.. THANK YOU SO MUCH!

When I tried to follow the instructions on the gist you forked this from, I was getting an config error.. Nothing was working, until I found your gist.

The problem I was having was in my [gpg] program = section, I had C:\Program Files\Git\usr\bin\gpg.exe

MY dumbass forgot that you has to escape the slashes. Again, thanks a million.

@Adurtxi
Copy link

Adurtxi commented Aug 16, 2021

Thanks a loot

@hellridergit
Copy link

Randomly googled this, and you went straight to the point, and got it working for me in a matter of 2 minutes.
Thank you!

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