git (v2.18.0) error setting certificate

created at 07-05-2021 views: 4

description

Prompt when 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

solution

Through searching, it is found that the directory of ca-bundle.crt is really

C:/soft/Git/mingw64/ssl/certs/ca-bundle.crt

Therefore, you need to modify the gitconfig file

C:\soft\Git\mingw64\etc\gitconfig

After finally modifying sslCAInfo to the location of ca-bundle.crt, git pull succeeds

[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
created at:07-05-2021
edited at: 07-05-2021: