I have been successfully signing my GIT commits in Visual Studio for several years using x86 versions of GPG/GPG4Win. I just updated to the new v5 release and find that, after I reboot my PC, signing fails because the signing agent isn’t running.
If I start the agent manually, signing in VS works fine again until I reboot. Is there some configuration that needs to be changed on upgrading from the x86 to the x64 GPG4Win version to ensure the agent is automatically started or is started by VS when needed?
Thanks for your reply. I do have Git configured correctly because commits are fine after I get the daemon running. The issue is that the daemon, which is supposed to self-start, either doesn’t or is picking up incorrect information and failing in some way.
I’ve spent way too much time on this! There is one version of GPG in the Git\Usr\bin folder and another in the GnuPG\bin folder. There are some GPG settings in my %userproifile%.gnupg folder and more files in the AppData\local folder and even more in the AppData\roaming folder
Some versions appear to use the profile files while others use the roaming files. I kept trying to work this out and was getting more and more confused so I restored my C: driver to the state before I installed GPG4Win v5, installed V5 again, and configured Git per your link.
After this signing worked fine again (and faster than before I installed V5),. However, after a reboot signing failed per my original post.
I’ve now created a scheduled task that runs at logon to manually start the daemon:
Sorry for jumping to conclusions and thank you for describing your workaround!
Then the issue that the gpg-agent does not start by itself might be related to this bug:
Regarding the multiple locations with gpg related binaries and settings:
From Gpg4win are the binaries below C:\Program Files\GnuPG and C:\Program Files\Gpg4win.
Configuration files are mainly in a users AppData\roaming\gnupg folder, all configuration is below AppData.
The configuration in %USERPROFILE% is likely from your git installation, which obviously installs its own gpg, as the binaries below Git show.
I’d recommend putting Gpg4win and GnuPG earlier in the PATH as git, so that you will use the more up to date gpg version.