error: failed to push some refs to
Hi.
I have a stage in teamcity which is updating some file and after updating this file it is pushing it back to remote repo.
But while It is trying to push to the repo I got the error:
[11:54:03]To bitbucket.org:stakelogicbv/sl-infrastructure.git[11:54:03] ! [rejected] master -> master (non-fast-forward)[11:54:03]error: failed to push some refs to 'bitbucket.org:example/sl-infrastructure.git'[11:54:03]hint: Updates were rejected because the tip of your current branch is behind[11:54:03]hint: its remote counterpart. Integrate the remote changes (e.g.[11:54:03]hint: 'git pull ...') before pushing again.[11:54:03]hint: See the 'Note about fast-forwards' in 'git push --help' for details.
[11:54:03]Process exited with code 1
I checked the box "Clean up workspace".
The job is running on the one agent and in a consistent way. So there i no parallel job is running even.
I dont understand what is happening. Why it does not work in teamcity. While I can do it manually.
Anybody has expierenced this kind of issue ?
Regards.
The job is running on the one agent and in a consistent way. So there i no parallel job is running even.
I dont understand what is happening. Why it does not work in teamcity. While I can do it manually.
Anybody has expierenced this kind of issue ?
Regards.
Please sign in to leave a comment.
Hello,
Seems this problem is not TeamCity specific. While the build is running someone else makes a commit to the same repository, after that the build can't push anymore without pulling the new commits first. So this is what git is suggesting here: run git pull before the push.