Unable to clone All-Projects repo after Gerrit install

401 views
Skip to first unread message

Tom Green

unread,
Sep 18, 2013, 8:57:06 AM9/18/13
to repo-d...@googlegroups.com


Hi,

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, but it's unclear to me why All-Projects is refusing to clone.

Cheers,
Tom

Matthias Sohn

unread,
Sep 18, 2013, 9:16:38 AM9/18/13
to Tom Green, Repo and Gerrit Discussion
try this:

$ 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

--
Matthias 

Tom Green

unread,
Sep 18, 2013, 10:10:12 AM9/18/13
to repo-d...@googlegroups.com, Tom Green
The above allowed me to correctly get a clone of the repo, make the change, and push back to gerrit.
I confirmed that the changes were in place by again pulling from All-Projects in a new repo and checking the change appeared in the git log.

However, under the Access panel on the Gerrit GUI, there is still no reference to a Verified label, only Code Review.
I stopped the gerrit server and started it again to ensure it re-read any config, but with no change.

I added the Verified label definition as per instructions here:

The tail of project.config now looks like this:

[label "Code-Review"]
        function = MaxWithBlock
        copyMinScore = true
        value = -2 Do not submit
        value = -1 I would prefer that you didn't submit this
        value =  0 No score
        value = +1 Looks good to me, but someone else must approve
        value = +2 Looks good to me, approved
[label "Verified"]
        function = MaxWithBlock
        value = -1 Fails
        value =  0 No score
        value = +1 Verified

Cheers,
Tom

Tom Green

unread,
Sep 18, 2013, 10:14:10 AM9/18/13
to repo-d...@googlegroups.com
Sorry, yes, this works for me now.
I'd missed the 'add permission' button in the Access panel in GUI.

Thanks for the help, much appreciated.

Cheers,
Tom
Reply all
Reply to author
Forward
0 new messages