Unable to pull/push in git repository

前端 未结 23 2150
执笔经年
执笔经年 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:58

    I was also facing this problem in windows and running git using gitbash. I just reinstalled gitbash, And gitbash automatically managed git certificate and its path needed.

    0 讨论(0)
  • 2020-12-08 06:58

    I ran into the same error message but while cloning a github repository, unfortunately setting the http.sslcainfo didnt quite help. As I happened to be behind a corporate proxy server, setting the http.proxy fixed it for me.

    0 讨论(0)
  • 2020-12-08 06:58

    I had previously installed git, then uninstalled it.

    So for me was as simple as reinstalling the correct version of git (for me win x64) from

    https://git-scm.com/download/win

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2020-12-08 07:00

    I have the similar problem, but uninstalling gitbash and reinstalling to the system, worked for me.

    0 讨论(0)
  • 2020-12-08 07:01

    Go your git directory and move the mingw64/ssl folder to mingw64/libexec/ssl

    0 讨论(0)
提交回复
热议问题