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、解決方法
- 重新設置git配置文件路徑:(推薦)
git config --system http.sslcainfo "D:\_dev\Git\mingw64\ssl\certs\ca-bundle.crt"
- 關閉證書校驗:
git config --system http.sslverify false