Git推送错误:RPC失败;结果=22,HTTP代码=502

Git推送错误:RPC失败;结果=22,HTTP代码=502,git,http,ssh,centos,gitlab,Git,Http,Ssh,Centos,Gitlab,我正试图使用git将一个大型项目添加到GitLab中,除了一个文件夹之外,其他一切都适合我。此文件夹包括网站(5GB)的所有媒体(仅jpg和pdf) 因此,如果我执行:git add.,它会添加除此文件夹之外的所有内容。稍后我必须添加:add-f 当我尝试推送此文件夹时,会出现以下错误: - Via http: [aritz@localhost html]$ git push -u originhttp master Username for 'https://gitlab.com': ***

我正试图使用git将一个大型项目添加到GitLab中,除了一个文件夹之外,其他一切都适合我。此文件夹包括网站(5GB)的所有媒体(仅jpg和pdf)

因此,如果我执行:git add.,它会添加除此文件夹之外的所有内容。稍后我必须添加:add-f

当我尝试推送此文件夹时,会出现以下错误:

- Via http:

[aritz@localhost html]$ git push -u originhttp master
Username for 'https://gitlab.com': *******
Password for 'https://*******@gitlab.com':
Counting objects: 11006, done.
Compressing objects: 100% (9541/9541), done.
Writing objects: 100% (11003/11003), 2.99 GiB | 7.25 MiB/s, done.
Total 11003 (delta 895), reused 0 (delta 0)
error: RPC failed; result=22, HTTP code = 520
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

- Via SSH:

[aritz@localhost html]$ git push -u origin master
Counting objects: 11006, done.
Connection to gitlab.com closed by remote host.
fatal: The remote end hung up unexpectedly
Compressing objects: 100% (9541/9541), done.
error: pack-objects died of signal 13
error: failed to push some refs to 'git@gitlab.com:****/*********.git'
我所尝试的:

- Remove proxy
git config --global --unset http.proxy
git config --global --unset https.proxy

- Add data:
git config --global user.name ""
git config --global user.email ""

- Expand postBuffer:
git config --global http.postBuffer 157286400
git config --global http.postBuffer 524288000
我还查看了httpd日志,但没有看到任何相关内容。并且该文件夹的权限与其他文件相同

最后,作为另一种选择,我尝试仅为此文件夹创建一个空存储库:

在这种情况下,我可以进行git添加。不用强迫。但当我试图推动时,结果是:

- Via ssh:

[aritz@localhost resources]$ git push -u originssh master
Counting objects: 11086, done.
Connection to gitlab.com closed by remote host.
fatal: The remote end hung up unexpectedly
Compressing objects: 100% (9623/9623), done.
error: pack-objects died of signal 13
error: failed to push some refs to 'git@gitlab.com:*****/*********.git'

- Via http:

[aritz@localhost resources]$ git push -u origin master
Username for 'https://gitlab.com': ********
Password for 'https://********@gitlab.com': 
Counting objects: 11086, done.
Compressing objects: 100% (9623/9623), done.
Writing objects: 100% (11086/11086), 2.99 GiB | 5.97 MiB/s, done.
Total 11086 (delta 892), reused 0 (delta 0)
error: RPC failed; result=22, HTTP code = 502
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

在我的多次尝试中,我成功地使其工作,但尽管我相信我已经遵循了与以前相同的步骤,但我无法使其再次工作。

如果大文件是二进制文件,您可以使用Git LFS,这将允许在不需要时将二进制文件与存储库分开,因此,用户不必下载整个存储库以及二进制文件,这将节省时间


有关Git LFS的更多信息,请访问以下网页,

这似乎是我的解决方案。我不知道gitLab是否应该接受我的文件(它们不是非常大的文件,但总的来说它们占用了5GB),但是有了这个工具,我已经能够做我想要的事情了。我不认识git LFS,非常感谢!我认为问题已经解决了