文章目录
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
这条命令速度如何?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。