詹金斯Git发布失败 [英] Jenkins Git Release Failure

查看:244
本文介绍了詹金斯Git发布失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Jenkins Maven Release插件与Git合并,并且作业失败,因为它无法找到git可执行文件。

我的git repo使用ssh设置,我可以在Jenkins服务器上执行Git命令。
我可以使用Jenkins运行一个构建,并且一切都从Git repo中成功地被拉下来。



但是当我尝试释放时,Jenkins找不到git命令。我做错了什么?

Jenkins信息:


  • 版本1.504 li>
  • Git Plugin 1.2.0

  • Git Client Plugin 1.0.3

  • 在Windows Server 2008上运行
  • >


安装在Windows服务器上的Git - 1.8.1.msysgit.1



<$ p $执行:cmd.exe / X / Cgit add -pom.xml
[INFO] BUILD FAILURE
[INFO] ----- -------------------------------------------------- -----------------
[信息]总时间:14.305s
[信息]完成日期:二月05 05:26:22 CST 2013
[INFO]最终内存:10M / 168M
[信息] ------------------------------- -----------------------------------------
[JENKINS]归档C :\Users\svctpsolap\jenkins_home\jobs\NBEntity\workspace\\\
bentity\pom.xml to C:\Users\svctpsolap\jenkins_home\jobs\NBEntity\modules\ com.nb $ nbentity\builds\2013-03-05_13-26-05\archive\c om.nb\\\
bentity\0.0.1-SNAPSHOT\\\
bentity-0.0.1-SNAPSHOT.pom
等待Jenkins完成收集数据
mavenExecutionResult异常不为空
消息:失败执行目标org.apache.maven.plugins:maven-release-plugin:2.0:准备(默认-cli)项目nbentity:无法提交文件
提供程序消息:
git-add命令失败。
命令输出:
'git'不被识别为内部或外部命令,
可操作程序或批处理文件。


解决方案

将路径添加到 git.cmd 添加到系统 PATH 环境中。然后重新启动Windows以生效(仅重新启动Jenkins服务是不够的)。


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:

  • Version 1.504
  • Git Plugin 1.2.0
  • Git Client Plugin 1.0.3
  • Running on Windows Server 2008

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.

解决方案

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).

这篇关于詹金斯Git发布失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆