git提示error setting certificate verify locations解决办法

作者:星辰网络工作室 日期:2021-05-20 浏览:2488

错误信息

使用TortoiseGit执行pull命令时显示


git.exe pull --progress --no-rebase -v "origin"


fatal: unable to access 'https://*******/': error setting certificate verify locations:

CAfile: D:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

CApath: none

原因

换电脑直接加装了原来的硬盘,盘符从D变成了G,所以证书路径不对了


解决方法

先打开git bash窗口

执行命令:


git config --system http.sslcainfo "G:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt"

(注意修改为正确的文件路径)或

git config --system http.sslverify false

————————————————