keskiviikko 28. lokakuuta 2009

Installation of Gerrit

I had a lot of minor issues when installing Gerrit. Fortunately I found pretty good installation help from I also used as guide.

Unfortunately, there wasn't nothing much about using http-basic authentication as a login method when using Jetty, so here's some tips for that. These were done with Jetty 6.8.

First, follow the basic instructions. Then uncompress gerrit.war to Jettys /webapps, make sure that it goes gerrit -directory.

Add following to WEB-INF/web.xml under gerrit -directory, I added these to the top of the file.

    <web-resource-name>A Protected Page</web-resource-name>


Add following lines into gerrit.xml in Jetty's contexts -directory:

<get name="securityHandler">
  <set name="userRealm">

    <new class="">
      <set name="name">GerritRealm</set>
      <set name="config"><systemproperty default="." name="jetty.home">/etc/</systemproperty></set>

Finally, create into Jetty's etc/ and check etc/ for help. Passwords can be created by using the following command:

java -cp lib/jetty-xxx.jar:lib/jetty-util-xxx.jar