Unable to pull/push in git repository

前端 未结 23 2146
执笔经年
执笔经年 2020-12-08 06:15
$ git pull origin master
fatal: unable to access \'https://xxxxxxxxxxxxxxx\': 
      error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/P         


        
23条回答
  •  有刺的猬
    2020-12-08 06:59

    When using https you will need to supply password or using a certificate. In your case looks like the certificate is not a valid one.

    Try fixing it like this by telling git where to find the certificate:

    // Add the certificate to your configuration file
    git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
    

    Alternatively, you could disable SSL checks:

    // or switch off SSL checks completely by executing:
    git config --system http.sslverify false
    

    Set this in your config to disable it only for the given url and not for all requests

    [http "https://weak.example.com"]
        sslVerify = false
    

    http.sslVerify

    Whether to verify the SSL certificate when fetching or pushing over HTTPS.


    http.sslCAInfo

    File containing the certificates to verify the peer with when fetching or pushing over HTTPS

提交回复
热议问题