Git error setting certificate verify locations

一、错误

Cloning into 'cloud-config'...
fatal: unable to access 'https://code.aliyun.com/***/***.git/': error sett                                                                                                                          ing certificate verify locations:
  CAfile: D:/Git/Git/mingw64/ssl/certs/ca-bundle.crt
  CApath: none

二、错误原因
根据路径D:/Git/Git/mingw64/ssl/certs/ca-bundle.crt查找文件,发现并不存在!可能我在安装Git后又重新改了目录所导致的。

三、解决方法
找到自己电脑上Git的实际安装目录下的ca-bundle.crt文件,然后复制该文件路径:“D:\GitHub\Git\mingw64\ssl\certs\ca-bundle.crt”

$ git config --system http.sslcainfo "D:\GitHub\Git\mingw64\ssl\certs\ca-bundle.crt"

查看http.sslcainfo是否配置成功

$ git config -l

Git error setting certificate verify locations_第1张图片

你可能感兴趣的:(错误)