Joe Intrakamhang
Joe Intrakamhang

Reputation: 489

Jenkins Git Release Failure

I'm trying to incorporate Jenkins Maven Release plugin with Git and the job is failing because it can't find the git executable.

My git repo is setup with ssh and I can execute the Git command on the Jenkins server. I can run a build using Jenkins and everything is pulled down from the Git repo successfully.

But when I try to do a release, Jenkins fails to find the git command. What am I doing wrong?

Jenkins Info:

Git Installed on the Windows server - 1.8.1.msysgit.1

[INFO] Executing: cmd.exe /X /C "git add -- pom.xml"
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.305s
[INFO] Finished at: Tue Mar 05 12:26:22 CST 2013
[INFO] Final Memory: 10M/168M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving C:\Users\svctpsolap\jenkins_home\jobs\NBEntity\workspace\nbentity\pom.xml to C:\Users\svctpsolap\jenkins_home\jobs\NBEntity\modules\com.nb$nbentity\builds\2013-03-05_13-26-05\archive\com.nb\nbentity\0.0.1-SNAPSHOT\nbentity-0.0.1-SNAPSHOT.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project nbentity: Unable to commit files
Provider message:
The git-add command failed.
Command output:
'git' is not recognized as an internal or external command,
operable program or batch file.

Upvotes: 1

Views: 1880

Answers (1)

Joe Intrakamhang
Joe Intrakamhang

Reputation: 489

Add the path to the git.cmd to the system PATH environment. Then restart Windows to take effect (restarting the Jenkins service alone is not enough).

Upvotes: 2

Related Questions