git推送出现“error: RPC failed; HTTP 408 curl 22 The requested URL returned error: 408”解决方案

在使用git推送时报错:

error: RPC failed; HTTP 408 curl 22 The requested URL returned error: 408
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (386/386), 1.11 GiB | 1.84 MiB/s, done.
Total 386 (delta 138), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly

应该是文件太大的原因(7.84G)

使用了:1.修改混存区大小;2.修改config文件;3.打开vpn,均不能解决问题。所以尝试使用LFS来解决这个问题。

在安装git lfs之前,需要先安装git,再将git lfs安装在git的安装路径下的Git/bin文件夹中,然后将两者的路径都添加到系统变量中(如何添加系统变量百度有一大堆),就可以使用git lfs了,此时在命令行输入git lfs install,如果系统返回Git LFS initialized. 则说明git lfs已经安装成功。但是可能文件实在过于大,推送途中收到邮件说把我账号的lfs禁用了哈哈哈哈哈哈哈哈

最后手动剔除冗余数据到789M,重新git push,然后报了新error:

remote: error: Trace: 0807e2ee5b6f9ad2e21780f00e268154f7759b183f45ecd51f5ce3382262b70c
remote: error: See https://gh.io/lfs for more information.
remote: error: File metric/app2/before/save_app2.txt is 135.73 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/young-ye/Metric-Result.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/young-ye/Metric-Result.git'

然后使用 git lfs track "*.txt"命令,最后成功git push!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值