git (v2.18.0) error setting certificate

27次阅读

共计 570 个字符,预计需要花费 2 分钟才能阅读完成。

git pull 时提示:
fatal: unable to access ‘https://xxx/xxx/xxx.git/’: error setting certificate verify locations:
CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
通过搜索发现 ca-bundle.crt 真是的目录是
C:/soft/Git/mingw64/ssl/certs/ca-bundle.crt
因此需要修改 gitconfig 的文件
C:\soft\Git\mingw64\etc\gitconfig
最终将 sslCAInfo 修改成 ca-bundle.crt 的位置后,git pull 成功
[http]
sslCAInfo = C:/soft/Git/mingw64/ssl/certs/ca-bundle.crt
sslBackend = openssl

textconv = astextplain
[filter “lfs”]
clean = git-lfs clean — %f
smudge = git-lfs smudge — %f
process = git-lfs filter-process
required = true
[credential]
helper = manager

正文完
 0