Git 常见问题汇总

7,591 阅读1分钟

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

-> 解决方式

git config --global http.postBuffer 524288000

Github clone 很慢

通过修改系统hosts文件,避免域名被限制,

MacOS 如何修改 hosts 文件

151.101.72.249  http://global-ssl.fastly.Net
192.30.253.112  http://github.com

值得注意的是ip和域名之间是tab键,而非Space

error: RPC failed; curl transfer closed with outstanding read data remaining

错误描述

Clone failed
RPC failed; curl 18 transfer closed with outstanding read data remaining
the remote end hung up unexpectedly
early EOF
index-pack failed

错误原因

网络链接慢,仓库过大等导致链接中断,clone操作被取消

解决方式

表层clone,后再更新仓库历史记录(可选)

git clone xxx-project.git --depth 1

//等待成功后 可选操作
cd xxx-project
git fetch --unshallow