I am getting the below error while making ssl connection with self signed certificate. \"Peer certificate cannot be authenticated with known CA certificates\"
It is
Though this error happened in the case of using git clone rather than with using curl, I've recently stumbled across an identical error message:
Peer certificate cannot be authenticated with known CA certificates
Similar to Arth's findings, something that worked for CentOS 6 (in order to successfully use HTTPS URLs with git clone for related GitLab repositories) involved updating the trusted certificates on the server (i.e., the server that is using HTTPS), using the following steps:
sudo yum install ca-certificatessudo update-ca-trust enablesudo cp /path/to/your_new_cert.crt /etc/pki/ca-trust/source/anchors/sudo update-ca-trust extractPerhaps the same certificate steps can be applied for the case of curl (or other similar scenarios) for users on CentOS in the future.