1

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?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Raj Singh
  • 39
  • 2
  • 6

3 Answers3

1

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)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

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

Raj Singh
  • 39
  • 2
  • 6
0

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.

Taco
  • 181
  • 1
  • 12