解决Git 克隆代码 The remote end hung up unexpectedly错误

  • Post author:
  • Post category:其他


在移动办公时,使用热点的网络质量一般,使用git clone总是报错

查看原因有三种可能:要么是缓存不够,要么是网络不行,要么墙的原因

我的应该是网络不行,可以配置git的最低速度和最低速度时间:


git config --global http.lowSpeedLimit 0



git config --global http.lowSpeedTime 999999

总算把代码克隆下来了。


【补充】文件太大的解决方法:



clone

或者

push git

项目时,文件太大也会出现

fatal: The remote end hung up unexpectedly

此时需要修改

.gitconfig

配置文件,打开终端,执行指令:

git config http.postBuffer 524288000



postBuffer

的缓存设置为500M即可。



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