任何熟悉git错误的人“缺少对象000000000000000000000000000000000000为refs / heads /...&”? [英] Anyone familiar with the git error "missing object 0000000000000000000000000000000000000000 for refs/heads/..."?

查看:500
本文介绍了任何熟悉git错误的人“缺少对象000000000000000000000000000000000000为refs / heads /...&”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在运行git v1.7.1并配置了gitweb。我们也使用gitolite进行管理,但我不认为这与这个问题密切相关。有时我们会在Apache日志中看到如下错误:

 缺少对象0000000000000000000000000000000000000000 for refs / heads / ... 

最后的elipse通常是分支名称。我相信这个零串是suppost是一个SHA1值。显然,所有的零不是SHA1值。我不清楚这个值来自哪里?



我在服务器上运行git fsck,但没有报告问题,但是git gc解决了问题。此外,我们能够拉到并推送到这个存储库(和该分支)罚款。

我知道其他人也看到了这个问题,因为这里有一个关闭的问题:
Gitweb失败:致命:缺少对象0000000000000000000000000000000000000000对于裁判/头/主
没有回答这个问题。



其他信息



我们现在看到了这个问题在我们的gitolite-admin存储库上。我们的gitolite-admin存储库中没有分支,所以这不在分支上。

在远程的默认分支被改变并且之前的默认分支被删除之后。我的本地存储库中仍然存在对已删除分支的引用。 $ b


.git \refs\remotes\origin\HEAD p>

我简单地更新了这个引用新的默认远程。


We are running git v1.7.1 and have gitweb configured. We also use gitolite for administration, but I do not believe that is germane to this issue. From time to time we get an error in the Apache log like:

missing object 0000000000000000000000000000000000000000 for refs/heads/...

Where the elipse at the end is typically a branch name. I believe that the string of zeros is suppost to be a SHA1 value. Obviously, all zeros is not a SHA1 value. It is not clear to me where this value is comming from?

I have run git fsck on the server and it did not report an issue, however git gc resolves the problem. Also, we are able to pull and push to this repository (and that branch) fine. Only gitweb appears to be effected.

I know others have seen this issue becuase there is a closed question about it here: Gitweb failure: fatal: missing object 0000000000000000000000000000000000000000 for refs/heads/master There is no answer to that question.

Additional Information

We have now seen this isssue on our gitolite-admin repository. We do not have branches in our gitolite-admin repository, so this was not on a branch.

解决方案

This error occurred for me after the default branch on the remote was changed and the former default branch was deleted. My local repository still had a reference to the deleted branch in

.git\refs\remotes\origin\HEAD

I simply updated this to reference the new default remote.

这篇关于任何熟悉git错误的人“缺少对象000000000000000000000000000000000000为refs / heads /...&”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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