Skip to content
Permalink
fac8bf9bb7
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (23 sloc) 650 Bytes
stages:
- mirror
mirror:
stage: mirror
image: ianayoung/rsync
tags:
- linux
cache: {}
script:
# run ssh-agent
- eval $(ssh-agent -s)
# add appropriate private key to the agent store
- ssh-add <(echo "$MIRROR_KEY")
# set known hosts list
# WARNING: use only in docker container, if you use it with shell you will
# overwrite your user's ssh config
- mkdir -p ~/.ssh
- cp deploy/known_hosts ~/.ssh/known_hosts
# Do a bare clone of the repository
- git clone --bare $CI_REPOSITORY_URL
# Mirror push it to the destination
- cd $CI_PROJECT_NAME.git
- git push --mirror $MIRROR_DEST