diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 776c9af95c9d07239c06864d63b6b616e328dd9f..0302410a3d651b9c3a247008967bca63e75a7684 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -24,11 +24,11 @@ sync: - master script: - git config --global credential.helper store && touch ~/.git-credentials - - echo "https://${PROJECT_ACCESS_TOKEN_USERNAME}:${PROJECT_ACCESS_TOKEN}@${CI_SERVER_HOST}" >> ~/.git-credentials || true + - echo "https://${GIT_PUSH_LOGIN}:${GIT_PUSH_PASSWORD}@${CI_SERVER_HOST}" >> ~/.git-credentials || true - ( test -n "${GIT_LOGIN}" && test -n "${GIT_PASSWORD}" ) && echo "https://${GIT_LOGIN}:${GIT_PASSWORD}@$(echo ${GIT_URL} | sed -r 's#([^/])/[^/].*#\1#' | sed -e 's|https://||g')" >> ~/.git-credentials || true - ( eval $(ssh-agent -s); echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null && mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config ) || true - - git checkout master - - git remote add upstream "${GIT_URL}" - - git fetch upstream + - cat ~/.git-credentials + - git checkout master && git pull + - git remote add upstream "${GIT_URL}" && git fetch upstream - git pull upstream "${GIT_UPSTGREAM_BRANCH}" - git push