Git tagging fails in TeamCity 6.5.2.

I'm trying to tag sources in our Git repository from a build in TeamCity.

We use Gerrit for code reviews, but it has been configured to bypass code review for annotated tags.

When I try to run "Label this build sources", I get the following error:

Failed: Failed to set label 'Prod-1.0.1': The remote tag was not created (REJECTED_OTHER_REASON): Prod-1.0.1
When our TC admin tries, he gets this error:

Labeling process failed: Labelling failed: org.eclipse.jgit.api.errors.JGitInternalException: Updating the ref refs/tags/Prod-1.0.1 to Tag={ object 706317b83739c51c0486d60f9b001f16cc9b5976 type commit tag Prod-1.0.1 tagger PersonIdent[root, root@gitserver, Tue Oct 30 13:44:30 2012 -0600] } failed. ReturnCode from RefUpdate.update() was REJECTED

Couple of questions:

1. Is TeamCity trying to do an annotated tag or a lightweight tag?

2. Why is TC using a PersonIdent of "root", instead of the user specified in the VCS root configuration? This might why it's failing.

Has anyone else encountered and solved this problem?

Thanks for your help.


Comment actions Permalink

I'm getting the exact same problem.

I was trying out Git builds on our TeamCity 5 server, in which tagging worked (had to alter the gerrit config to allow "Create Reference" on refs/tags/* ).
However, I'm currently trying out TeamCity 7, and the tagging is no longer working.

I noticed in the VCS root config there is now a "username for tags" option, but even setting that is causing tags to fail.

I'm trying out a username combo that exists in teamcity and gerrit, to see if that works, otherwise I'll try to raise an issue.

I've created issue

Comment actions Permalink


I see you got this working. We've now upgraded to version 7.1.3 and I'm still attempting to get labelling working. Putting the teamCity user in the "Username for tags" field doesn't seem to help.

How did you specify the user for tagging? I'm getting an exception showing the PersonIdent as "root".

We have all registered users in Gerrit with "Push Annotated Tags", which includes our teamcity user.

Thanks for your help.


Comment actions Permalink

Under refs/tags/* , I added "Push annotated tag", as well as "Forge commiter identity".

See how that goes.


Please sign in to leave a comment.