Unable to clone All-Projects repo after Gerrit install

时光毁灭记忆、已成空白 提交于 2019-12-04 22:20:49

问题


I have a newly setup instance of Gerrit

Currently there are only two repos: All-Projects binutils-test

When attempting to clone All-Projects I receive the following error:

git clone  ssh://user@hostname:29418/All-Projects
Initialized empty Git repository in /home/user/
error: Trying to write ref HEAD with nonexistant object 2055f748c7285720057fe7213258e6c5b11776e3
fatal: Cannot update the ref 'HEAD'.

Cloning of the other repository (binutils-test) works OK, so at least the basic setup seems OK. My user is a member of the Administators group, and so shouldn't have any access issues.

My end goal is cloning All-Projects so I can modify the project.config to add the Verified label.


回答1:


This blog provides details on how to add the "Verified Label" in the project.config and that required you to modify the All-Projects projects.




回答2:


After posting a similar question to the gerrit mailing list (repo-discuss), I got the following instructions. These at least act as a workaround and enabled me to edit the project.config and push the changes back to gerrit. I now have a working "verified" label.

$ git init cfg ; cd cfg
$ git remote add origin ssh://user@hostname:29418/All-Projects
$ git pull origin refs/meta/config
$ vi project.config
$ git commit -a -m 'Updated permissions'
$ git push origin HEAD:refs/meta/config

this is described in http://www.eclipsecon.org/2013/sites/eclipsecon.org.2013/files/Deploying%20Gerrit%20Code%20Review.pdf



来源:https://stackoverflow.com/questions/18872651/unable-to-clone-all-projects-repo-after-gerrit-install

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!