Concourse pipeline build fails with error hint: Updates were rejected because the tag already exists in the remote

615 Views Asked by At

Concourse pipeline build fails with error hint:

Updates were rejected because the tag already exists in the remote.
demo_app-source
Updated tag 'DEMO_0.0.3' (was fb544ad)
To https://proactionus..com/bitbucket/scm/cacsad/demo.git
 ! [rejected]        DEMO_0.0.3 -> DEMO_0.0.3 (already exists)
error: failed to push some refs to 'https://proactionus.com/bitbucket/scm/cacsad/demo.git'
hint: Updates were rejected because the tag already exists in the remote.

How can I avoid this error message?

3

There are 3 best solutions below

0
VonC On

It depends on your scenario:

In the second case, make sure to restore the DEMO_0.0.3 to its original place (check where it is in the remote origin)

0
Raj Singh On

I fixed this error by running below command from git bash under repository path git tag -l | xargs -n 1 git push --delete origin

0
Taco On

I had this same error, but in my scenario the branch name was the same as a tag. You are not allowed to give a branch and a tag the same name.