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.
If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.
Cloning a Gerrit project is done the same way as cloning any other git repository by using the git clone command. $ git clone ssh://gerrithost:29418/RecipeBook.git RecipeBook Cloning into RecipeBook... The URL for cloning the project can be found in the Gerrit web UI under Projects > List > <project-name> > General .
When you clone a repository, you don't get one file, like you may in other centralized version control systems. By cloning with Git, you get the entire repository - all files, all branches, and all commits. Cloning a repository is typically only done once, at the beginning of your interaction with a project.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With