Git 检查问题 [致命:早期 EOF]
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2505644/
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 checking out problem [fatal: early EOFs]
提问by Style
I'm running a Ubuntu (9.10) server with Git (latest from Ubuntu package manager) installed. Access to the Git is via SSH. On windows machines, I'm using Cygwin to push/pull code.
我正在运行安装了 Git(来自 Ubuntu 包管理器的最新版本)的 Ubuntu (9.10) 服务器。通过 SSH 访问 Git。在 Windows 机器上,我使用 Cygwin 来推/拉代码。
I can push my project code onto the server but when I do a clone or pull, it returns a [fatal: early EOFs] error at about 75-80%.
我可以将我的项目代码推送到服务器上,但是当我进行克隆或拉取时,它会返回一个 [fatal: early EOFs] 错误,大约为 75-80%。
Upon further investigation, it seems like textual data has no issue when pulled/cloned but when the jar files and images are pulled from Git, the error will occur.
经过进一步调查,似乎文本数据在拉取/克隆时没有问题,但是当从 Git 拉取 jar 文件和图像时,就会发生错误。
Any suggestion/advice that can help to resolve this issue?
任何可以帮助解决此问题的建议/建议?
Thanks in advance.
提前致谢。
回答by VonC
What is the Git version are you using (Ubuntu 9.10 packages mentions 1.6.3)
您使用的是什么 Git 版本(Ubuntu 9.10 软件包提到了 1.6.3)
A recent thread reported a similar issue with Git1.7.1, although it was from a Cygwin environment.
最近的一个线程报告了Git1.7.1的类似问题,尽管它来自 Cygwin 环境。
$ git clone git:/repo/git/acl acl.test
Initialized empty Git repository in /c/tmp/acl.test/.git/
remote: Counting objects: 9205, done.
remote: Compressing objects: 100% (3300/3300), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs: 62% (5708/9205)
fatal: index-pack failed
Did you try downgrade your Git (on the server side and/or the client side) and see if the problem persists?
您是否尝试降级您的 Git(在服务器端和/或客户端)并查看问题是否仍然存在?
As the OP Stylereports in the comments, the message can also be trigger by an incorrect protocol:
正如评论中的 OP Style报告的那样,该消息也可能由不正确的协议触发:
git+ssh://
instead of just:
而不仅仅是:
ssh:// + git command
ssh:// + git 命令
回答by Voket
@rickb I found that running
@rickb 我发现正在运行
git config --add core.compression -1
in the client (cygwin) repository fixed it.
在客户端(cygwin)存储库中修复了它。
回答by GermanF
git config --global --add core.compression -1
git config --global --add core.compression -1
回答by Sverre
For some reason, the problem went away after I enabled Compression in the ~/.ssh/config file. God knows why.
出于某种原因,在 ~/.ssh/config 文件中启用压缩后问题就消失了。天知道为什么。
回答by Tim Abell
Try msysgit. I had the same issue with cygwin's git, and when I fetched the same repository using msysgit it worked first time.
试试msysgit。我对 cygwin 的 git 有同样的问题,当我使用 msysgit 获取相同的存储库时,它第一次工作。
See also this thread: http://cygwin.com/ml/cygwin/2010-09/msg00832.html
回答by Mohammad AlQanneh
Checkout this answer: https://stackoverflow.com/a/6849424
签出这个答案:https: //stackoverflow.com/a/6849424
also you can try: git config --global core.compression 0 tp disable the compressions.
您也可以尝试: git config --global core.compression 0 tp 禁用压缩。