在使用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:文章来源:https://www.toymoban.com/news/detail-508330.html
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!文章来源地址https://www.toymoban.com/news/detail-508330.html
到了这里,关于git推送出现“error: RPC failed; HTTP 408 curl 22 The requested URL returned error: 408”解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!