fatl: the remote end hung up unexpectedly

git提交代码报错504

error: RPC failed ; HTTP 504 curl 22 The requested URL returned error: 504
send-pack: unexpected disconnect while reading sideband pack 
fatl: the remote end hung up unexpectedly

原因

git push/pull.   导致文件内容过大报错HTTP 504 curl 22 The requested URL returned error: 504.     
git config http.postBuffer 524288000  

解决方法

[root@git ~]#git config --global http.lowSpeedLimit 0

[root@git ~]#git config --global http.lowSpeedTime 999999

[root@git ~]# git config --global http.postBuffer 5242880

使用git clone代码的时候报如下错误:

Cloning into 'FanHeIOSV2'...

error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out

fatal: The remote end hung up unexpectedly

一,加大缓存区

[root@git ~]#git config --global http.postBuffer 524288000 

这个大约是500M
二、少clone一些,–depth 1

[root@git ~]#git clone https://git.com/ad/abd.git --depth 1 

–depth 1的含义是复制深度为1,就是每个文件只取最近一次提交,不是整个历史版本。
三、换协议
clone http方式换成SSH的方式,即 https:// 改为 git://

例如[root@git ~]#git clone https://git.com/ad/abd.git
换成[root@git ~]#git clone git://git.com/ad/abc.git
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rio520

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值