[Solved] fatal: unable to access : SSL certificate problem: self signed certificate in certificate chain

If you get the following error:

fatal: unable to access <git>: SSL certificate problem: self signed certificate in certificate chain

..when trying to clone a git repo, then you can quickly get around it by doing one of the following.

Note that both of these solutions are merely workarounds and should be done at absolute worst case.

Workaround Solution 1

Disable SSL verification while running the git clone.

git -c http.sslVerify=false clone <repository-name>
Code language: Bash (bash)

Workaround Solution 2

Disable SSL verification globally while running the git clone.

git config --global http.sslVerify false
Code language: Bash (bash)

Solution 3 (recommended)

This solution is recommended, but takes a lot more work.

Download the actual certificate/certificate chain from the Git server and install it locally by pointing your --system configuration for http.sslCAPath to it.

git config --system http.sslCAPath /path/to/cacerts
Code language: Bash (bash)
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments