【已解決】error setting certificate verify locations報錯


1、問題描述

在公司的電腦上從Github上clone項目的時候git黑窗口報錯“error setting certificate verify locations”,意思就是證書位置設置錯誤。

fatal: unable to access 'https://github.com/goSilver/daydayup.git/': error setting certificate verify locations:
  CAfile: D:/dev/Git/mingw64/ssl/certs/ca-bundle.crt
  CApath: none

2、問題分析

通過仔細對比路徑,終於找到問題:我當初在安裝git的時候我是安裝在“dev”文件夾下面的,但是由於個人習慣,后來我在文件夾名字前面加了一個“_”,導致了git的配置文件里的路徑和我實際的路徑不一致了,故報錯證書位置設置錯誤。

3、解決方法

  1. 重新設置git配置文件路徑:(推薦)
git config --system http.sslcainfo "D:\_dev\Git\mingw64\ssl\certs\ca-bundle.crt"

  1. 關閉證書校驗:
git config --system http.sslverify false 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM