Getting error in Curl - Peer certificate cannot be authenticated with known CA certificates

前端 未结 6 2044
长发绾君心
长发绾君心 2021-01-02 03:33

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

6条回答
  •  感动是毒
    2021-01-02 04:02

    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:

    1. sudo yum install ca-certificates
    2. sudo update-ca-trust enable
    3. sudo cp /path/to/your_new_cert.crt /etc/pki/ca-trust/source/anchors/
    4. sudo update-ca-trust extract

    Perhaps the same certificate steps can be applied for the case of curl (or other similar scenarios) for users on CentOS in the future.

提交回复
热议问题