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

参考文章

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: