git config --global commit.gpgsign true and gpg-agent

399 views
Skip to first unread message

Andreas Krüger

unread,
Mar 7, 2018, 2:42:01 AM3/7/18
to git-for-windows
Hello,

as an avid Linux fan, I'm not using git for windows myself, but I'm currently teaching git
to a group of people on Windows who do. Version 2.16.1, in case that matters.

I was recommending to them to habitually sign all their commits, as I do myself,
by creating GPG keys for themselves and setting

git config --global commit.gpgsign true

That works, but people have to type in their GPG private key's pass phrase
on each and every commit they are doing under Windows.

Which is cumbersome. I hesitate to continue recommending it if it is that cumbersome.

Under Linux, I'm used to the gpg-agent functionality. It asks me for the pass phrase
only every so often and remembers it for me, for a while. 

That functionality does not yet seem to be available in the git for windows package.

I'm also hesitant to recommend using GPG private keys without passphrases.

I'm still more hesitant to recommend not signing commits, as, in their cooperate environment,
accountability of commits goes to nil if they don't.

Are there any plans to provide gpg-agent functionality in the git for windows package?

Do I have any "silver bullet" option right now I'm not aware of?

Regards,

Andreas

George Chakhidze

unread,
Mar 9, 2018, 12:13:12 PM3/9/18
to git-for-windows
As a workaround for this problem, I am using official gpg (not the one included with Git for Windows); configuration in .gitconfig:

[gpg]
    program = C:/Program Files (x86)/GnuPG/bin/gpg.exe

And I have enabled agent daemon in C:\Users\UserName\AppData\Roaming\gnupg\gpg.conf with use-agent directive.

Reply all
Reply to author
Forward
0 new messages