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

总结:千万不要修改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 "新路径"

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值