A simple docker image for mirroring a git repository to another server. This is created with a Gitlab CI Runner in mind.
Simply configure the Gitlab CI runner like this:
.gitlab-ci.yml
stages:
- mirror
mirror:
image: owja/git-mirror-repository
stage: mirror
retry: 2
variables:
GIT_STRATEGY: none
GIT_CHECKOUT: "false"
script:
- git-mirror-repository ${CI_REPOSITORY_URL} htts://username:[email protected]/my/repository.git
The command is this:
$ git-mirror-repository [source] [target]