[go: up one dir, main page]

Skip to content

Bidirectional mirroring instructions are no longer valid

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

in the bidirectional mirror docs, the example script shows TARGET_REPO is assigned a remote url. The remote is a push mirror configured in the repository settings in the web UI.

In newer versions of Gitlab, configuring a push mirror does not result in the creation of a remote in the repository on the server, so TARGET_REPO is always blank and the example is broken.

We relied on this behaviour and it’s pretty annoying to not be able to change the remote URL, or in general inject extra environment variables, into the server hook environment without hard coding values in the script. In our use case we have many projects that all need a pre-receive hook and the only difference is the remote URL so it’s convenient to only maintain a single version of the script without any hard coded configuration.

Edited by 🤖 GitLab Bot 🤖