发布于 4年前

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
git
©2020 edoou.com   京ICP备16001874号-3