Re: Gerrit with external repository

2,154 views
Skip to first unread message

Steffen Gebert

unread,
Mar 13, 2013, 3:13:27 AM3/13/13
to repo-discuss@googlegroups.com Discussion
Dear Pragalathan,

Gerrit ships with replication support. Replication was extracted to a plugin with Gerrit 2.5, so I'm not sure, where the official documentation is hosted. You can see the docs on our installation: https://review.typo3.org/plugins/replication/Documentation/config.html

Replication works very well and it enalbes you to replicate your repository to another git server. Of course, (the user running) Gerrit needs push privileges to this mirror.

Still, as probably pointed out in all other threads: Gerrit needs to host the primary repository. Changes to the other repository will not (easily) make it into Gerrit's repo.

If you have trouble setting up replication, just ask here. I guess lot of people have it running with success (us at TYPO3 included).

Yours
Steffen

On Mar 13, 2013, at 7:21 AM, pragal...@myntra.com wrote:

> Hi,
> My company uses a licensed git hosting. We were using reviewboard for the (SVN) code reviews. However after moving to git, gerrit seems to be appropriate as it provides much more functionalities along with code review. However I could not make my gerrit setup use our external repository.
>
> I have seen this question asked in many forums and in this group itself (https://groups.google.com/forum/?fromgroups=#!topic/repo-discuss/nud3oXg9ErY). It is still unclear to me.
>
> 1. Is it a reliable way to make gerrit push changes to the external repo, using the hooks or is there any better way?
> 2. If it is reliable or if there is any better way, where can I find any documentation to do that?
>
> Any pointer is appreciated.
>
> Thanks,
> Pragalathan M
>
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

pragal...@myntra.com

unread,
Mar 15, 2013, 11:05:02 AM3/15/13
to repo-d...@googlegroups.com
Thanks Steffen for taking time to help me. Sorry for the late reply. The link you have provided is exhaustive. I will try that on Monday and get back to you, if i face any issue. Once again thanks for your support.
-Pragalathan M

Shawn Pearce

unread,
Apr 5, 2013, 4:52:54 PM4/5/13
to Giovanni Gargiulo, repo-discuss
On Fri, Apr 5, 2013 at 7:32 AM, Giovanni Gargiulo
<gargiul...@gmail.com> wrote:
> I'm trying to introduce Gerrit in my team. At the moment we already have a
> git repo that is used in a jenkins pipeline.
>
> Now, I've been able to clone the git repo inside Gerrit cloning it as a
> "mirror" in the ${gerrit_home}/git/ folder.
>
> Everything works fine, I can clone from Gerrit, push to it, run jenkins to
> validate and review code with my colleagues. When a changeset is verifyied
> and merged, thou, it does not get push to the main repo.
>
> As a workaround I used the (plugin) replication to push reviewed changes to
> the main repo (the main original one connected to the jenkins pipeline). Is
> the replication the only one solution?

Unfortunately yes. Gerrit was built under the assumption that it is
the gatekeeper of _the_ central repository. Replication exists to send
copies to other systems after-the-fact for backup purposes, or
automated builds after submit, etc.

I understand the use case of wanting to have Gerrit play nice with an
existing central repository and take advantage of the distributed
nature of Git, but unfortunately Gerrit was not built with this in
mind, so it doesn't do it. In theory it could be fixed in Gerrit, but
its some effort to have Gerrit perform all writes to a remote
repository, and continuously poll the remote to make sure its local
one is up-to-date before accepting a push to a branch, or submitting a
change.

Saikrishna Vedaraju

unread,
Aug 9, 2017, 5:00:52 AM8/9/17
to Repo and Gerrit Discussion
Hi,

I have GitLab Opensource server hosted & I would like to make integrate gerrit with GitLab. Is there any ways to find the solution.
Reply all
Reply to author
Forward
0 new messages