git报错- unable to access xxx error setting certificate verify locations: CAfile: D:/Git/Git/mingw64/

  • Post author:
  • Post category:其他


总结:千万不要修改git文件夹路径


以下报错解决适应于修改git文件夹导致的错误

报错根本原因:

下载git后,放在D版中git文件下,我发现最外层git文件下又包了一层git文件夹,遂把第二层文件夹删掉,导致以下问题:

1.右击git bash 提示找不到应用程序

解决:

(1). Win+R 键 调出运行框,输入regedit

(2).地址框输入以下地址

计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell\command

(3).查看现在的git bash路径 更改为现在路径

2.报错:

fatal: unable to access Recv failure: Connection was reset

解决:

(1).git bash 中输入

git config –global –unset http.proxy

git config –global –unset https.proxy

(2).从Windows搜索中输入

打开cmd

,将ipconfig/flushdns复制,点击回车,清理DNS缓存

(3).git bash 中输入

git config –global http.sslVerify “false”

(4).重新提交:

git add .

git commit -m ‘xxx’

git push origin master

(5).登陆验证以下(可以选第二个,打开网址输入提示的验证码)

3.在2中报错error setting certificate verify locations

unable to access ‘https://github.com/JingLi980/react-git-exercise.git/’: error setting certificate verify locations:  CAfile: D:/Git/Git/mingw64/etc/ssl/certs/ca-bundle.crt CApath: none

原因:都是因为修改了git文件夹

解决:

看报错的路径 我的CAfile路径错误,因为修改了git文件夹,这里的路径还是原来的路径

从新配置文件路径:

git config –system http.sslcainfo “新路径”



版权声明:本文为m0_62544477原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。