Can not clone git repo to server
I’m running the same command on 2 different servers. One works, the other doesn’t.
git clone https://blah.com:8443/blah.git
On server A, it works fine. I get the objects, files, etc. no problems.
On server B, I get the following message.
git clone https://blah.com:8443/blah.git Cloning into 'blah'... error: Peer certificate cannot be authenticated with known CA certificates while accessing https://blah.com:8443/blah.git/info/refs?service=git-upload-pack fatal: HTTP request failed
Does anyone know what this means or what I need to do to get this to work? Thanks in advance for any help you can give me.
One Solution collect form web for “Can not clone git repo to server”
Here is a question covering trusting a self-signed certificate. This is the proper way to fix the issue assuming you are using a self-signed cert.
This question covers ignoring a certificate, however, depending on which method you use, this could result in ignoring all certificates, which would make communicating with your git server insecure, and is therefore a quick solution, but not a good solution. If you take this route, I would recommend at least using the per-repository setting (
git config http.sslVerify false) instead of applying it more broadly in order to minimize the severe negative impact of this method.