質問

I'd like to introduce Gerrit on the project I'm working on.

At the moment we already have a git repository with some code committed on it.

I've initialized the project as follows:

  1. java -jar gerrit-full-2.5.2.war init --batch -d gerrit-codereview
  2. cd gerrit-codereview/git
  3. git clone --mirror git@172.18.x.x:my-repo.git

Then I took care of creating users and adding permissions.

I can see changes going through and I can review/publish them. Unfortunately thou, the very final "git push" (that should be executed by Gerrit), does not take place. If I go manually in the "gerrit-codereview/git/my-repo.git" folder and I execute "git push" everything works fine.

Any idea?

役に立ちましたか?

解決

Gerrit doesn't currently support referencing external repositories as the master. You can use the replication plugin (which ships with Gerrit) to push to external repositories, but it won't handle merge conflicts if changes are made upstream. This is a commonly requested feature. More information is available at How to update gerrit repos with changes submitted directly to git?

他のヒント

The best approach for myself is to:

  1. Create project on gerrit with same name as original
  2. git clone --mirror "project you want to clone"
  3. mv "project you cloned".git "your Gerrit installation"/git/

Here is an example. I want to clone raspberry linux kernel and locate it as rpi/linux project on Gerrit

  1. Create gerrit project rpi/linux
  2. rm -r "your Gerrit installation"/git/rpi/linux.git
  3. git clone --mirror git@github.com:raspberrypi/linux.git
  4. mv linux.git "your Gerrit installation"/git/rpi/
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top