Two way git mirror: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann |
imported>Hendrik Brummermann No edit summary |
||
| Line 1: | 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. |
|||
{{TODO|introduction}} |
|||
== Motivation == |
|||
{{TODO|motivation}} |
|||
== Setup == |
== Setup == |
||
| Line 24: | Line 19: | ||
</source> |
</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. |
|||
{{TODO|Setup webhook at github and sourceforge}} |
|||
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 == |
== Mirror scripts == |
||
| Line 87: | Line 83: | ||
system('sudo -Hu gitsync /usr/local/bin/gitsync '.$repo); |
system('sudo -Hu gitsync /usr/local/bin/gitsync '.$repo); |
||
</source> |
</source> |
||
== Security == |
== Security == |
||