Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command failed git update-git-for-windows

Tags:

git

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.

like image 878
A. G. Araujo Avatar asked Feb 26 '20 18:02

A. G. Araujo


People also ask

What version of Git do I have Windows command line?

You can check your current version of Git by running the git --version command in a terminal (Linux, macOS) or command prompt (Windows).

What is git bash?

What is Git Bash? Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience. Bash is an acronym for Bourne Again Shell. A shell is a terminal application used to interface with an operating system through written commands.


2 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.

like image 170
Carlos Pimentel Avatar answered Oct 04 '22 07:10

Carlos Pimentel


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.

like image 39
HamiltonPharmD Avatar answered Oct 04 '22 06:10

HamiltonPharmD