推送时,Git 推送失败并显示“致命:早期 EOF”,但仅限于一个文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12009493/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git push fails with "fatal: early EOF" when PUSHing but only on one file
提问by Greg
When I try adding textures and text files to my repo it all works, but when I try adding a .blend file I get this error. I've tried a bunch of things I found here and on google, none of them worked (all were for clone/pull commands)
当我尝试将纹理和文本文件添加到我的存储库时,一切正常,但是当我尝试添加 .blend 文件时,出现此错误。我已经尝试了很多我在这里和谷歌上找到的东西,但都没有奏效(全部用于克隆/拉取命令)
I'm using Tortoise git 1.7.8 and Git 1.7.10 msysgit - I changed to them after the latest builds failed.
我正在使用 Tortoise git 1.7.8 和 Git 1.7.10 msysgit - 在最新构建失败后我改为使用它们。
Others have no problem pushing things to the repo, but I did not send them the .blend file.
其他人将东西推送到 repo 没有问题,但我没有向他们发送 .blend 文件。
Here is the output:
这是输出:
Pushing to ssh://[email protected]:x/home/git/gitrepo
Counting objects: 4, done.
Compressing objects: 100% (3/3)
Writing objects: 100% (3/3), 112.00 KiB | 116 KiB/s
Writing objects: 100% (3/3), 113.07 KiB | 116 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
fatal: early EOF
error: unpack failed: unpack-objects abnormal exit
To ssh://[email protected]:x/home/git/gitrepo
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://[email protected]:x/home/git/gitrepo'
EDIT: It now seems this is a server problem, since github works. I'll update if I find a solution.
编辑:现在看来这是一个服务器问题,因为 github 有效。如果我找到解决方案,我会更新。
回答by Heinzi
(This answer is a workaround, not a solution.)
(此答案是一种解决方法,而不是解决方案。)
I've just had the same problem (can't push my changes anymore using TortoiseGit/msysgit). Since the problem occurs during unpacking, it can be avoided by disabling compression:
我刚刚遇到了同样的问题(无法再使用 TortoiseGit/msysgit 推送我的更改)。由于问题出现在解包过程中,可以通过禁用压缩来避免:
- Context Menu on the folder/TortoiseGit/Settings
- "Edit local .git/config"
- Add
compression = 0
to the[core]
section.
- 文件夹/TortoiseGit/Settings 上的上下文菜单
- “编辑本地 .git/config”
- 添加
compression = 0
到该[core]
部分。
Obviously, disabling compression might affect performance, so use this workaround at your own discretion.
显然,禁用压缩可能会影响性能,因此请自行决定使用此解决方法。
回答by richarddonkin
I'm just going to add what worked for me in case someone else stumbles upon this problem.
我只是要添加对我有用的东西,以防其他人偶然发现这个问题。
Execute the following on the command line to make large files work when you get the above error.
出现上述错误时,在命令行执行以下命令使大文件工作。
git config http.postBuffer 524288000
See https://groups.google.com/forum/#!topic/gitlabhq/tNfe2POcY4E.
请参阅https://groups.google.com/forum/#!topic/gitlabhq/tNfe2POcY4E。
回答by NitinK
It's possible that you are overflowing the postbuffer.
您可能会溢出后缓冲区。
The following command fixes the symptom for me:
以下命令为我修复了该症状:
git config http.postBuffer 524288000
See this related issue: https://stackoverflow.com/a/3605544/193785
请参阅此相关问题:https: //stackoverflow.com/a/3605544/193785