Two way git mirror: Difference between revisions
Content deleted Content added
imported>Hendrik Brummermann |
imported>Hendrik Brummermann No edit summary |
||
Line 1:
This articles describes how to setup a two way mirror of git repositories. I hope this article will be helpful as it works around a number of caveats for two way git mirrors.
== Setup ==
Line 24 ⟶ 19:
</source>
The mirroring should happen right after changes have been pushed to one of the repositories. Therefore a webhook is required to trigger the mirror script.
On Sourceforge a project admin needs to enable it at Admin -> Tools -> Repository -> Webhooks. On Github it is at Settings -> Webhooks & Services -> Add Webhook.
== Mirror scripts ==
Line 87 ⟶ 83:
system('sudo -Hu gitsync /usr/local/bin/gitsync '.$repo);
</source>
== Security ==
| |||