Jenkins Git reference repository path for tag

Viewed 418

I'm getting the following error message, if I use e.g. "Scan Multibranch Pipeline Now" in Jenkins.:

 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*" returned status code 1:

 ! [rejected]            v1.6.3-beta1 -> v1.6.3-beta1  (would clobber existing tag)

If I delete the tag v1.6.3-beta1 on the remote Git server, "Scan Multibranch Pipeline Now" in Jenkins runs without an error and building pipelines work.

If I repush a new created tag v1.6.3-beta1 that was already deleted on the Git remote, "Scan Multibranch Pipeline Now" in Jenkins is broken again. It seems Jenkins still has the local tag v1.6.3-beta1 somewhere.

The problem I can not figure out where Jenkins stores the "local" tags / the reference Git repository.

Can anyone help me to find the location where Jenkins runs "Scan Multibranch Pipeline Now" check, so I can delete the local tag by myself?

1 Answers

Outside Jenkins, a simple forced fetch with git fetch -f would be enough

git fetch --tags -f

That should override any local tag.

With Jenkins, this issue pops up with Git 2.20+: issue JENKINS-55284.

The git client plugin 2.7.6 released January 10, 2019, should include a force option.

Related