【发布时间】:2021-01-15 01:32:32
【问题描述】:
我正在尝试使用 git 将一个大型项目添加到 GitLab,除了文件夹之外的所有内容都对我有用。此文件夹包含网站的所有媒体(仅 jpg 和 pdf)(5GB)。
因此,如果我执行以下操作: 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 add 。不必强迫它。但是当我尝试推动这是结果:
- 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 http ssh centos gitlab