'Visual Studio 2019 Stopped Pushing to Git

I have VS Community 2019 and everything was working fine with my Git repo on Azure DevOps. However VS updated this morning and now for some reason it won't push to Git. It seems like that must be the issue because that's the only thing that changed since the last time I pushed. Now when I try to push my commits I get this:

> Pushing develop Error encountered while pushing to the remote
> repository: Git failed with a fatal error. unable to access
> '<<my repo>>':
> error setting certificate verify locations:   CAfile: c:/program files
> (x86)/microsoft visual
> studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team
> explorer/Git/mingw32/bin/curl-ca-bundle.crt   CApath: none Pushing to
> <<my repo>>

The really odd part is if I just do a git bash at the repo directory and use git push it works...

How can I fix this?



Solution 1:[1]

In all of these cases, the recommendation is to upgrade the Git credential Manager for Windows.

https://jessehouwing.net/configure-visual-studio-to-use-a-different-git-credential-manager-for-windows/

Solution 2:[2]

If the file curl-ca-bundle.crt doesn't exist in:

c:/program files (x86)/microsoft visual studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin/curl-ca-bundle.crt

Try copying the CRT file from your local git installation.

Use command prompt to run git config -l --show-origin. Look for the entry http.sslcainfo=/ssl/certs/ca-bundle.crt. Copy the file ca-bundle.crt into the visual studio directory ../team explorer/Git/mingw32/bin/ and rename it to curl-ca-bundle.crt.

Restart Visual Studio and try pushing again.

Solution 3:[3]

I faced the same issue in Visual Studio 2022, but Git started functioning normally, after I re-reinstalled Git in my machine (leaving link below). For me, the path displayed in error did not exist and when I opened the path C:/Program Files/Git, it was empty. This was happening after I uninstalled Git in my machine, so that prompted me to re-install it.

Link for git download: https://git-scm.com/download/win

Solution 4:[4]

I had the same issue after updating my Visual Studio 2019. It was unable to find filepath: c:/program files (x86)/microsoft visual studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin/ca-bundle.crt

Search for ca-bundle.crt in C:\Program Files (x86)\Microsoft Visual Studio\2019

copy ca-bundle.crt and paste it in the directory where it is looking for it. If the directory does not exist, create c:/program files (x86)/microsoft visual studio/2019/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/bin and paste the certificate into it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ram Chan
Solution 2 kennykee
Solution 3
Solution 4 Stanley Okpala Nwosa