文章目录
git远程克隆仓库报错
fatal: The remote end hung up unexpectedly
所以在此记录一下解决方案,主要是网速太慢的原因。
思路
实施
- 在网站 https://www.ipaddress.com/ 分别搜索:
github.global.ssl.fastly.net
github.com
得到ip:
编辑hosts文件
vim /etc/hosts
199.232.69.194 github.global.ssl.fastly.net
140.82.112.3 github.com
保存更新DNS,安装nscd
yum install -y nscd
刷新这个守护进程
service nscd restart
但是克隆远程仓库又报错:fatal: Out of memory, malloc Failed (tried to allocate 1048576000 bytes)
还是网络慢的原因,所以需要设置git配置参数,否则因此超时退出
git参数配置
cgit参数配置如下:
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
git config --global http.postBuffer 5242880
完成,试试git clone
这条命令速度如何?