hudson+git FATAL: Could not apply tag

I'm trying to set up hudson with git according to this article, but I still get git errors during build:

FATAL: Could not apply tag-PROJECTNAME-ID
Caused by: hudson.plugins.git.GitException: Command returned status code 128: 
*** Please tell me who you are.

running: git config --global shows valid data, .gitconfig is accessible.

How to correct those errors?


If might need both and There is actually an open ticket to set them automatically.

It might also be a Hudson server issue:

I was a little confused to see this message since I had already configured git to have my user name and email. Then I remembered that Hudson is running on tomcat which is running with the tomcat6 user. I needed to configure the tomcat6 user to have the git configuration necessary to tag on the git repositories.

Setup the git configuration for the tomcat6 user by doing the following:

sudo -s -H -u tomcat6
git config --global "Hudson"
git config --global ""

As a note, if you are using Hudson to commit and push to another repository these configuration settings will be used for all commits done by Hudson.

The next step is to let Hudson know where the HOME is for the tomcat6 user. On the Hudson/configure page there is a checkbox for defining environment variables. Once it is checked you will be able to put in a key-value pair. Add the following pair and save your configuration:

name: HOME
value: /usr/share/tomcat6/

The next time a Hudson project is built you should see the following line close to the top of the console output:

Env: HOME=/usr/share/tomcat6/

The git plugin should now be able to successfully tag the repository and continue with the build.

As mentioned here, you might have a special tomcat6 user with no account (no login allowed, with no shell: I quote "tomcat6はログイン不許可( シェルは/bin/false)ってなっている"), in which case you need to setup and email on the system level)

git config - system "kompiro @ ..."
git config --system " kompiro... " 

If you are using the tomcat6 user in Hudson, Hudson will need to see that user in the /etc/passwd, as mentioned here:

More specifically, in the /etc/passwd. For some reason here GIT need an entry in the field for the full name. Under Ubuntu the Tomcat user has placed there by default, nothing ("Unter Ubuntu hat der Tomcat-User dort standardmäßig nichts gesetzt."). Adds one there now simply 'Tomcat 6,,, a', it also runs with the CI-neighbors. ("Fügt man jetzt dort einfach 'Tomcat 6,,,' ein, läuft es auch mit dem CI-Nachbarn")

After installing the git plugin you can configure git name and email in Jenkins "Configure System" page...

In the new Hudson version with git plugin, you may set both: the username and the user email via the Hudson web interface options.

Or you just can disable tagging. In project configurations, under Source Code Management go to Advanced. There you can check "Skip internal Tagging"

Need Your Help

DataTable: How to get item value with row name and column name? (VB) datatable

I have a simple DataTable where one of the columns contains unique values. For example:

How to use Bower with private Bitbucket repository?

git bitbucket private bower

I'm working on a project, where I have some public bower components, and I'm writing some of my own. But, I don't want to publish/register it on bower registry. I wan't to use my PRIVATE Bitbucket