Git
Git clone and getting error ‘Peer’s Certificate issuer is not recognized.’. [Fixed][shared server]

Git clone and getting error ‘Peer’s Certificate issuer is not recognized.’. [Fixed][shared server]

Are you trying to pull or clone the repo but getting peer’s certificate issue? Well, I have a solution for you. If are you getting something like this, I might be helpful 😎.

https://gitlab.com/yourRepo.git/’: Peer’s Certificate issuer is not recognized.

First thing, this is due to certificate issue. So, you will need to find the path of ca-bundle.crt. If you have terminal access, check somewhere in /etc/ssl/certs/. Or you might have different location. If the location is correct your path to crt is /etc/ssl/certs/ca-bundle.crt. Now follow these steps in your terminal

  • nano ~/.gitconfig
  • Paste this line
[http]
  sslVerify = true
  sslCAinfo = /etc/ssl/certs/ca-bundle.crt
  • Press ctrl+x and press y.

Don’t use sslVerify = false. That is really bad practice. And also if this doesnt work, type GIT_CURL_VERBOSE=1 git clone https://gitlab.com/yourRepo.git to find what is the issue. Adding GIT_CURL_VERBOSE=1 will give you more information regarding the issue.

If you are Problem with the SSL CA cert (path? access rights?) issue, it means the sslCAInfo path is wrong or you have mistakenly placed something. Check twice regarding the path and you will be good to go.

Hope this helps.

Thanks

Leave a Reply