hudson+git FATAL: Could not apply tag hudson+git FATAL: Could not apply tag git git

hudson+git FATAL: Could not apply tag


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

git options in jenkins


If might need both user.name and user.email.
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 tomcat6git config --global user.name "Hudson"git config --global user.email "hudson@mydomain.com"exit

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: HOMEvalue: /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 user.name and email on the system level)

git config - system user.email "kompiro @ ..."git config --system user.name " 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")


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