SSL certificate problem: self signed certificate in certificate chain error network-wide detailed solutions

insert image description here

1. Reproduce the error


When using git clone xxx.gitthe project today, the following error message was reported:

insert image description here

i.e. SSL certificate problem: self signed certificate in certificate chainerror.

2. Analysis errors


It is catching up with the recent ChatGPTpopularity, and you can use it to analyze errors, as shown in the following figure:

insert image description here

This problem occurs when the SSL certificate presented by the server is not signed by a trusted certificate authority (CA). Instead, it is a self-signed certificate.

This can happen for a variety of reasons. For example, the website owner may have generated their own SSL certificate instead of purchasing one from a trusted CA. Alternatively, the CA that issued the certificate may not be recognized by the web browser being used to access the website.

When a self-signed certificate is encountered, the web browser will display a warning message to the user. The message will indicate that the certificate is not trusted and may be fraudulent. This can cause users to be wary of the website and may discourage them from continuing to use it.

To resolve this problem, website owners should obtain a valid SSL certificate from a trusted CA. This will ensure that users do not encounter any warning messages and can trust that their connection to the website is secure.

However, ChatGPTthe reply is in English, so you might as well translate it into Chinese, as follows:

This issue occurs when the server presents SSLa certificate that is not (CA)signed . Instead, it's a self-signed certificate.

This can happen for a variety of reasons. For example, a website owner may have generated their own SSL certificate instead of purchasing one from a trusted CA. WebAlternatively, the browser used to access the website may not recognize the certificate that was issued CA.

When encountering a self-signed certificate, Webthe browser will display a warning message to the user. The message will indicate that the certificate is not trusted and may be fraudulent. This may cause users to become wary of the website and may prevent them from continuing to use it. To resolve this issue, website owners should obtain valid certificates

from trusted . This will ensure that users do not encounter any warning messages and can trust that their connection to the website is secure.CASSL

ChatGPTAfter so many replies, in a word, SSLthe authentication failed.

It says this happens for a number of reasons, as follows:

  1. The website owner may have generated their own SSLcertificate instead of purchasing one from a trusted provider CA.

  2. WebThe browser used to access the website may not recognize the certificate that was issued CA.

However, I'm just gitlabdownloading the code from above and don't need to buy an ssl certificate.

It seems that ChatGPTmy error is not solved, only by my own analysis.

Since it says that sslthe authentication failed, then SSLjust turn off the authentication.

So, how to turn off sslauthentication?

3. Fix bugs

Open Git Bashand run the following command

export GIT_SSL_NO_VERIFY=true
git config --global http.sslVerify "false"

Or, in windowsthe command line of , enter gitthe disk location where the command is located, and execute the following gitcommand:

git config --global http.sslVerify false

Guess you like

Origin blog.csdn.net/lvoelife/article/details/129862925