git (v2.18.0) error setting certificate

BaseAccept發表於2019-01-03

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:softGitmingw64etcgitconfig

最終將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

相關文章