Pergunta

[Update in 2013.12.17]

According to the comments below, I upgrade gerrit to 2.8 and gitblit to 1.3.2, same as before.

Compiling gitblit from source is complex, I extract the jar from gitblit.zip from github release

[Update end]

I try to install gerrit (2.8) with gitblit (1.3.2) plugins on windows for demo, gerrit works and gitblit plugin is installed with links available, while when it states "Not found" when I browse branch.

Below are my steps on Windows using MSysGit environment

$ java -jar gerrit-2.8.war init -d review 
# use ldap to connect local ldap server, others are default
# copy gitblit plugin into plugins' folder
$ unzip gitblit-1.3.2.zip
$ cp gitblit.jar review/plugins/gitblit.jar

Update the etc/gerrit.config for gitblit

[gitweb]
type = custom
url  = plugins/
project = gitblit/summary/${project}
revision = gitblit/commit/${project}/${commit}
branch = gitblit/log/${project}/${branch}
filehistory = gitblit/history/${project}/${branch}/${file}
linkname = GitBlit

Now start the gerrit

$ java -jar review/bin/gerrit.war daemon -d review

The gerrit is started as normal, and the gitblit link is available for the branches, see snapshot

While when I click the gitblit link, it is stated below (url link is http:///plugins/gitblit/log/gtr/HEAD , can't find any error in logs directory

HTTP ERROR: 404

Problem accessing /plugins/gitblit/log/gtr/HEAD. Reason:

    Not Found

Any suggestion ?

Foi útil?

Solução

Seems you have tried to install GitBlit itself instead of the plugin. This does not work. In order to be able to use GitBlit as a plugin in Gerrit, you have to compile it yourself.

Download source code from GitBlit-Plugin-Source. The resulting artifact (gitblit-plugin-2.8-SNAPSHOT.jar, use the stable-2.8 branch) can be copied into the Gerrit plugin folder.

However:

The current GitBlit Plugin does not work with Gerrit 2.7. You either need 2.5 or 2.8.

Outras dicas

I followed the instructions in http://www.slideshare.net/lucamilanesio/gitblit-plugin-for-gerrit-code-review and quickly integrated gitblit into my gerrit 2.8 setup. (Well, I had to checkout the right branch of gitblit, I used 2.8-SNAPSHOT)

Sounds too complicated, I would recommend trying GitBlit. Take a look at Setup git server on windows in few clicks tutorial about how to get everything up and running in few minutes.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top