Closed sedrubal closed 9 years ago
The design of gitlab-mirrors does not allow this. A quote from the main README:
gitlab-mirrors creates read only copies of remote repositories in gitlab.
Bi-directional mirroring was not the original goal and tends to go wrong if a team force pushes changing the tree of one of the bi-directional mirrors. One solution to this is to always overwrite references. So it is certainly possible however not currently supported in the latest stable and development versions of gitlab-mirrors.
At this time I don't have any plans on adding this feature. However, you can certainly modify gitlab-mirrors yourself since it is primarily bash scripting and git commands.
Maybe gitmirror can realize, if a commit was made to the mirrored repo and then clone this and push to the original repo.
Thank you for your fast response ;)
Mirroring repositories require more work then you describe. Without going into too much detail this is more complicated than what ever should be handled via cron job. This should be handled by an integration as a commit hook (see the Gerrit replication plugin with github as an example). Two way contributions should be handled if and when Gitlab introduces a mirroring feature.
A development workflow can handle contributions from multiple sources but that would require a developer to have more than a basic understanding of git using multiple remotes. Google search advanced git training YouTube. I've posted a video which would enable a developer in git.
I cant mirror the repository bidirectional so that commits to the mirrored repo will be also committed to the original repo.
I don't know if this is because I failed or because the design doesn't allow this.
Or is is possible, to install gitlab-mirrors on the original git(lab) server too and to mirror the mirrored repo back?
Thank you