首先这是我的报错
Total 123 (delta 0), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
原因:项目太大,网络又不行导致下载过慢,超出了时间触发的错误
方法一:修改缓存大小
git config --global http.postBuffer 524288000
将仓库配置改为下面的
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/dhsb-4/SSM.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/hefs/master
[http]
postBuffer = 1048576000
配置路径(用记事本打开)
改好后重新推送
方法二:配置git的最低速度和最低速度时间
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999 单位 秒
- –global:针对当前用户
- –system:针对所有用户
方法三:使用SSH路径
我是用这个方法解决的