git (v2.18.0) error setting certificate

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
[diff “astextplain”]
textconv = astextplain
[filter “lfs”]
clean = git-lfs clean — %f
smudge = git-lfs smudge — %f
process = git-lfs filter-process
required = true
[credential]
helper = manager

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理