git克隆以“index-pack”失败失败了吗? [英] git clone fails with "index-pack" failed?

查看:746
本文介绍了git克隆以“index-pack”失败失败了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我创建了一个远程的repo,它不是裸露的(因为我需要redmine才能读取它),
,它被设置为与组共享(所以git init - -shared =基团)。我能够推到远程回购,现在我试图克隆它。



如果我通过网络克隆它,我会得到:

 远程:计数对象:4648,完成。 
remote:压缩对象:100%(2837/2837),完成。
错误:git-upload-pack:git-pack-objects死于error.B / s
致命错误:git-upload-pack:由于可能的远程端存储库损坏而中止。
remote:由于远程端可能存储库损坏而中止。
致命:早期EOF
致命:索引包失败

我是能够在没有问题的情况下在本地克隆它,并且我运行了git fsck,它只报告一些悬挂的树木/斑点,我知道这不是问题。什么可能导致这个?我仍然能够从中拉出来,只是不克隆。我应该注意到远程git版本是1.5.6.5,而本地版本是1.6.0.4。



我试图克隆我的本地副本,删除.git文件夹并推送到一个新的回购,然后克隆新的回购,我得到同样的错误,这导致我相信它可能是一个回购文件,导致git上传包失败...



编辑:
我在回购库中有许多windows二进制文件,因为我只是构建了python模块,然后将它们卡在那里,所以其他人也不必构建它们。如果我删除Windows二进制文件并推入新的回购站,我可以再次克隆,也许这提供了一个线索。试图缩小到现在导致问题的文件是什么。

解决方案

我解决这个问题的方式是这样的:我的git守护进程是在Windows上运行,并且客户端在其他计算机上。

我找到了一种解决方法(但它只能在Windows上运行)。



使用cmd.exe中的详细信息启动git守护程序:

 C:\程序文件\Git \ bin\sh.exe--login -i -c'git.exe daemon --verbose'

未经测试,如果它直接在git bash中运行。也许它会。

然后(在开始任何克隆,拉,取,...之前)在窗口中选择一些文本(注意:快速编辑模式必须是启用(可以在cmd.exe - >属性(单击cmd窗口的左上角) - >编辑选项)中找到),git守护程序在其中运行。这将阻止它在该窗口中打印任何进一步的消息。



当git守护进程的输出线程被阻塞时,那么错误不会发生。


So I created a remote repo that's not bare (because I need redmine to be able to read it), and it's set to be shared with the group (so git init --shared=group). I was able to push to the remote repo and now I'm trying to clone it.

If I clone it over the net I get this:

remote: Counting objects: 4648, done.
remote: Compressing objects: 100% (2837/2837), done.
error: git-upload-pack: git-pack-objects died with error.B/s  
fatal: git-upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

I'm able to clone it locally without a problem, and I ran "git fsck", which only reports some dangling trees/blobs, which I understand aren't a problem. What could be causing this? I'm still able to pull from it, just not clone. I should note the remote git version is 1.5.6.5 while local is 1.6.0.4

I tried cloning my local copy of the repo, stripping out the .git folder and pushing to a new repo, then cloning the new repo and I get the same error, which leads me to believe it may be a file in the repo that's causing git-upload-pack to fail...

Edit: I have a number of windows binaries in the repo, because I just built the python modules and then stuck them in there so everyone else didn't have to build them as well. If I remove the windows binaries and push to a new repo, I can clone again, perhaps that gives a clue. Trying to narrow down exactly what file is causing the problem now.

解决方案

The way I solved this problem is this: My git daemon is running on windows, and clients are on other computers.

I found a workaround (but it will only work on windows).

Start git daemon with verbose from cmd.exe:

"C:\Program Files\Git\bin\sh.exe" --login -i -c 'git.exe daemon --verbose  '

Not tested, if it works directly in git bash. Maybe it will.

Then (before starting any clone, pull, fetch,...) select some text in the window (note: "Quick Edit Mode" must be enabled (can be found in: cmd.exe --> Properties (click the top left corner of your cmd window) --> Edit Options)) in which git daemon runs. That will prevent it from printing any further messages in that window.

When the output thread of git daemon is blocked that way, then the error does not happen

这篇关于git克隆以“index-pack”失败失败了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆