I've used one main resource, but comments are closed, so I've decided to throw random remarks in this post, for myself and for you dear googler.
The reference is here:
http://gregmeiste.com/2009/06/gerrit-code-review-installation/
It looks much better than the official documentation, at least if like my you don't usually touch java stuff.
- I used ubuntu 9.04 (xen)
- apt-get install mysql-server mysql-client postfix
- I've started installing java packages (sun-java6 sun-java6-jre libcommons-configuration-java libservlet2.4-java un-java6-javadb) not sure all are usefull though
- Step 4: I didn't use phpmysql to create gerrit2 user but:
'GRANT ALL PRIVILEGES ON 'gerrit2'.* TO 'gerrit2'@'localhost' WITH GRANT OPTIONS; FLUSH PRIVILEGES;' - Step 9: when you are done editing GerritServer.properties you should move it to /home/gerrit2/cfg and chown it to gerrit2 user.
- Step 11: though jetty7 should work (using the distribution package?) I went for the latest 6 version.
- Step 12: I'm not sure about this 'plus' directory. I've done what she said, but l've also put stuff into 'jetty/lib/ext/'
- Also, in addition to the two packages to add, I've also moved the stuff I've apt-getted previously:
- cp /usr/share/java/commons-pool-1.4.jar jetty/lib/ext/
- cp /usr/share/java/commons-dbcp-1.2.1.jar jetty/lib/ext/
- Step 13: The documentation says:
java -jar gerrit-*.war --cat extra/jetty_gerrit.xml >gerrit.xml
But with my version it was more 'extra/jetty6/gerrit.xml' find out for yours using 'java -jar gerrit*war -ls' - Step 15: I installed jetty on 0.0.0.0:8081 instead of 127.0.0.1:8081
Tada! I had gerrit UI at the address above.
I registered the first user with openid.
Then it turns out I had to add an admin group, the SQL from the official guide wasn't working, so I did this:
insert into account_group_members (account_id, group_id) values (1, 1);
After having verified that my id was 1 and the admin group id was 1 too.
I declared my email address, which I confirmed.
I declared my ssh public key.
I declared my ssh username.
I restarted gerrit.
I confirmed that my ssh key was taken into account by:
ssh -p 29418 yann@codereview.local # should say: 'no shell something'
ssh -p 29418 yann@codereview.local gerrit ls-projects
Then I created my first project:
ssh -p 29418 gerrit@codereview.local gerrit create-project --name findlib
Then I had to give my group (Administrators) the right to push into this new project (using the UI)
Then I pushed my 'my-review' branch, should be something like:
git push ssh://yann@codereview.local:29418/findlib my-review
Then I worked.
Then I committed the work.
Then I used the magical refs to create a review:
git push ssh://yann@codereview.local:29418/findlib HEAD:refs/for/my-review
That's all, I hope this helps, comments are wide open for addendum to the above, but don't ask for help since it's merely chance that I went through all these steps without killing myself, so the mailing list would be a better place to ask.

Recent Comments