錯誤信息:
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目錄下。
解決方案:
修改 Git\mingw64\etc\gitconfig 文件。
將文件中的 C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt 替換成 C:/tools/Git/mingw64/ssl/certs/ca-bundle.crt
保存文件就可以了,如下圖: