In Jenkins, when sourcing a project from a Git repository you may find your builds failing. This is due to a configuration problem, where your Jenkins user does not have a git identity set.

To solve the issue change into your jenkins home dir (/var/lib/jenkins on Ubuntu) and add the following to a file named .gitconfig.

[user]
    name = Jenkins
    email = [email protected]

That will allow you to avoid this:

Started by user anonymous Checkout:workspace / /var/lib/jenkins/jobs/Bookings/workspace - [email protected] Using strategy: Default Checkout:workspace / /var/lib/jenkins/jobs/Bookings/workspace - [email protected] Cloning the remote Git repository Cloning repository origin Fetching upstream changes from file:///home/aaron/Sites/Bookings Seen branch in repository origin/HEAD Seen branch in repository origin/master Commencing build of Revision fc8a70bc628edb0ac547b3fefc0841db5e06204c (origin/HEAD, origin/master) Checking out Revision fc8a70bc628edb0ac547b3fefc0841db5e06204c (origin/HEAD, origin/master) FATAL: Could not apply tag jenkins-Bookings-1 hudson.plugins.git.GitException: Could not apply tag jenkins-Bookings-1 at hudson.plugins.git.GitAPI.tag(GitAPI.java:698) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1181) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1129) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1129) at hudson.model.AbstractProject.checkout(AbstractProject.java:1193) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:555) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:443) at hudson.model.Run.run(Run.java:1376) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175) Caused by: hudson.plugins.git.GitException: Error performing command: git tag -a -f -m Jenkins Build #1 jenkins-Bookings-1 Command "git tag -a -f -m Jenkins Build #1 jenkins-Bookings-1" returned status code 128: *** Please tell me who you are.

Run

git config --global user.email "[email protected]" git config --global user.name "Your Name"

to set your account's default identity. Omit --global to set the identity only in this repository.

fatal: empty ident <[email protected](none)> not allowed

at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:744)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:709)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:719)
at hudson.plugins.git.GitAPI.tag(GitAPI.java:696)
... 12 more

Caused by: hudson.plugins.git.GitException: Command "git tag -a -f -m Jenkins Build #1 jenkins-Bookings-1" returned status code 128: *** Please tell me who you are.