If you are connecting to an on premises TFS instance and you are using Git in Visual Studio 2017 then you may get the error “SSL certificate problem: unable to get local issuer certificate”.
To get around this you want the inbuilt Git to use WinSSL / the builtin Windows Security Store. You can do this in the following way:
- Close all instances of Visual Studio
- Open a command prompt as administrator
- cd to the installation directory for VS2017’s Git –
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin
- Run the command:
git config --system http.sslbackend schannel
- Reopen Visual Studio
This should modify the following file (by default)C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\etc\gitconfig
Worked for me, thanks! There’s a small error in the git config command, however. It requires two dashes as shown below.
git config –system http.sslbackend schannel
Thanks for pointing this out, it was actually a display issue in WordPress and was actually two dashes in the editor. Changed its style now to be code so it displays correctly 🙂