Loading gitlab-ci.yml +2 −3 Original line number Diff line number Diff line Loading @@ -43,11 +43,10 @@ sync: - eval $(ssh-agent -s) && mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - test -n "${GIT_PULL_PRIVATE_KEY}" && echo "${GIT_PULL_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null || true - test -n "${GIT_PUSH_PRIVATE_KEY}" && echo "${GIT_PUSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null || true - rm -rf /tmp/repo script: - echo "[${GIT_PULL_REPO}] -> [${GIT_PUSH_REPO}]" - git clone --bare "${GIT_PULL_REPO}" /tmp/repo - cd /tmp/repo - cd "$(mktemp -d)" - git clone --bare "${GIT_PULL_REPO}" . - git lfs fetch --all - git push --mirror "${GIT_PUSH_REPO}" - git lfs push --all "${GIT_PUSH_REPO}" Loading
gitlab-ci.yml +2 −3 Original line number Diff line number Diff line Loading @@ -43,11 +43,10 @@ sync: - eval $(ssh-agent -s) && mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - test -n "${GIT_PULL_PRIVATE_KEY}" && echo "${GIT_PULL_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null || true - test -n "${GIT_PUSH_PRIVATE_KEY}" && echo "${GIT_PUSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null || true - rm -rf /tmp/repo script: - echo "[${GIT_PULL_REPO}] -> [${GIT_PUSH_REPO}]" - git clone --bare "${GIT_PULL_REPO}" /tmp/repo - cd /tmp/repo - cd "$(mktemp -d)" - git clone --bare "${GIT_PULL_REPO}" . - git lfs fetch --all - git push --mirror "${GIT_PUSH_REPO}" - git lfs push --all "${GIT_PUSH_REPO}"