错误信息:
Failed to connect to repository : Command "C:/tools/Git/bin/git.exe ls-remote -h https:/XXXXX.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://XXXXXX.git/': error setting certificate verify locations:
CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
发生这个错误是因为我将git 的安装目录进行了移动 ,从缺省的C:/Program Files 移动到了 C:/tools目录下。
解决方案:
修改 Gitmingw64etcgitconfig 文件。
将文件中的 C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt 替换成 C:/tools/Git/mingw64/ssl/certs/ca-bundle.crt
保存文件就可以了,如下图: