am running Gitlab-CI with runners on-prem. The issue I am currently facing is that my internet connection gets interrupted from time to time. This causes the pipelines in Gitlab-CI to fail. Due to that I want to set up a git mirror that stores the code in the same network as the Gitlab-Runners are connected to.

I have already tried to set up this git mirror https://github.com/beefsack/git-mirror, unfortunately this mirror doesnt support git lfs, which I need for my pipelines. Apart from git lfs, another issue I see with this implementation is that the code is not updated immediately. This can cause errors when the Gitlab CI pipeline starts but the branch is not available on the offline mirror.

  • What solutions are you using to mirror your git locally?
  • Is there a way to automatically sync them in case of updates?

I would really appreciate any help!

1 Answer 1


What about the built-in gitlab repository-mirroring feature?

On the main development host, define a mirrored site where changes are copied to. Here the host where your runners wait for action is the "target".

See Sidebar /Settings / Repository /Mirroring repositories: "Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically." .

Issues are not copied/mirrored though, just the codebase is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.