Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
696 views
in Technique[技术] by (71.8m points)

github for windows - Unable to pull/push in git repository

$ git pull origin master
fatal: unable to access 'https://xxxxxxxxxxxxxxx': 
      error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/Programs/Git/usr/bin/curl-ca-bundle.crt
CApath: none

I am getting this error when I pull or push my code.

Please guide me to fix this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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)gitincurl-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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...