Command failed git update-git-for-windows

Viewed 5814

I'm trying to update my Git and by typing the command:

$ git update-git-for-windows

It displays the following error:

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Note: This problem started to appear after updating Windows to 1909.

3 Answers

I am using Kaspersky antivirus, and it was blocking the update.

I just disabled the internet and file protection and the update command worked properly. After that you might just enable the antivirus full protection.

I bumped into this exact error message which occurred while on my corporate machine + VPN after running git update-git-for-windows in git bash.

Windows Solution (worked for me):

  1. Identify the location of my ca-bundle.crt on my machine
  2. Navigate to C:\Users\[UserName]\AppData\Local\Programs\Git\mingw64\bin in another Explorer window
  3. Drag and drop a copy of the ca-bundle.crt found in step 1 into the ...\mingw64\bin folder from step 2.
  4. Rename the new copy of the ca-bundle.crt to curl-ca-bundle.crt
  5. Close all instances of git bash, reopen git bash, run git update-git-for-windows

The download was successful for me after completing these steps. Hopefully this saves another weary soul some time with this issue.

I solved this issue by these steps:

  1. Visit https://curl.se/docs/caextract.html
  2. Download last cacert-2022-04-26.pem
  3. Rename to curl-ca-bundle.crt
  4. Move the curl-ca-bundle.crt to C:\Program Files\Git\mingw64\bin

Then run again git update-git-for-windows

Related