I am new to Gitlab. and I’m wanting to upload files from a gitlab-runner to my repository, but I’m having problems with .gitlab-ci.yml and I don’t understand why. Where am I making the mistake? Everything is fine until the time to do the push and it gives an error. I don’t understand because the error refers to git pull when I already have it included. Please if anyone can give me a hint !!
stages:
- push
test_ci_push:
stage: push
allow_failure: false
script:
- git checkout master
- git pull origin master
- git branch
- echo "test" > hola.txt
- git add --all
- git commit -m "Push"
- git push http://gitlab-ci-token:${ACCESS_TOKEN}@gitlab.test.com/test/ansible_bkp.git HEAD:master
error: push of some references to 'http: // gitlab-ci- failed
token: mTJsqZtPWvDP2Q1xszQu@gitlab.test.com/test/ansible_bkp.git '
help: Updates were rejected because the remote contains work that
help: does not exist locally. This is usually caused by another repository
help: pushing to the same ref. You may want to integrate the changes first
help: remote (ex. 'git pull ...') before pushing again.
help: See 'Notes about fast-forwards0 in' git push --help 'for details.