“如何调试无法运行的程序”;C:\ProgramFiles\Git";詹金斯的工作?
我正在使用jenkins构建我的git项目,这是我在查看日志时遇到的错误。“如何调试无法运行的程序”;C:\ProgramFiles\Git";詹金斯的工作?,git,testing,jenkins,Git,Testing,Jenkins,我正在使用jenkins构建我的git项目,这是我在查看日志时遇到的错误。 我在jenkins中使用git插件 您将如何排除该错误消息的故障 Started by user anonymous Building in workspace E:\sw\jenkins\workspace\se12 ERROR: Workspace has a .git repository, but it appears to be corrupt. hudson.plugins.git.GitException:
我在jenkins中使用git插件 您将如何排除该错误消息的故障
Started by user anonymous
Building in workspace E:\sw\jenkins\workspace\se12
ERROR: Workspace has a .git repository, but it appears to be corrupt.
hudson.plugins.git.GitException: Error performing command: git rev-parse --is-inside-work-tree
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1180)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:962)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:972)
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Git" (in directory "E:\sw\jenkins\workspace\se12"): CreateProcess error=5, Access is denied
at java.lang.ProcessBuilder.start(Unknown Source)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1169)
... 16 more
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
Cloning the remote Git repository
Cloning repository $ git clone \\SE12\Adempiere370new\.git
Fetching upstream changes from $ git clone \\SE12\Adempiere370new\.git
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Error performing command: git fetch --tags --progress $ git clone \\SE12\Adempiere370new\.git +refs/heads/*:refs/remotes/origin/*
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1180)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1043)
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Git" (in directory "E:\sw\jenkins\workspace\se12"): CreateProcess error=5, Access is denied
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1169)
... 14 more
由匿名用户启动
在工作区E中生成:\sw\jenkins\workspace\se12
错误:工作区具有.git存储库,但它似乎已损坏。
hudson.plugins.git.git异常:执行命令时出错:git rev parse--在工作树中
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1180)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:962)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:972)
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
位于jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
原因:java.io.IOException:无法运行程序“C:\program Files\Git”(在目录“E:\sw\jenkins\workspace\se12”中):CreateProcess错误=5,访问被拒绝
位于java.lang.ProcessBuilder.start(未知源)
位于org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1169)
... 还有16个
原因:java.io.IOException:CreateProcess错误=5,访问被拒绝
在java.lang.ProcessImpl.create(本机方法)
位于java.lang.ProcessImpl。(未知源)
位于java.lang.ProcessImpl.start(未知源)
... 还有22个
克隆远程Git存储库
克隆存储库$git clone\\SE12\Adempiere370new\.git
正在从$git clone\\SE12\Adempiere370new\.git获取上游更改
错误:克隆远程回购“源”时出错
hudson.plugins.git.git异常:执行命令时出错:git fetch--tags--progress$git clone\\SE12\Adempiere370new\.git+refs/heads/*:refs/remotes/origin/*
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1180)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1043)
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
位于jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
原因:java.io.IOException:无法运行程序“C:\program Files\Git”(在目录“E:\sw\jenkins\workspace\se12”中):CreateProcess错误=5,访问被拒绝
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1169)
... 14多
可能是您错误地设置了git可执行文件路径
它不应该是C:\Program Files\Git
,而是C:\Program Files\Git\bin\Git.exe
(这类似于) 他提到: 如果您看到的输出表明Git无法克隆,类似下面的输出,请转到Jenkins配置设置(不是项目设置,而是全局设置)并将Git路径更改为完全限定路径(例如,不是“
Git
”而是“/usr/bin/Git
”或安装Git二进制文件的任何位置).
在您的情况下,请检查
C:\Program Files\Git
是否确实是您的Git安装路径。如果您正确知道Git路径,则只需提及Git.exe的路径,否则请在URL中提及“Git”。当它执行时,会检查jenkin sever path环境变量,并在其中一个路径中找到Git本身。在您的日志中,看起来Jenkins代理没有足够的权限执行Git
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Git" (in directory "E:\sw\jenkins\workspace\se12"): CreateProcess error=5, Access is denied
详细说明
CreateProcess error=5, Access is denied
对我来说,问题是不同的,它是
CreateProcess error=2, The system cannot find the file specified
在做一些研究时,我遇到了这个问题
在最底层,有人说windows中的默认路径配置指向
C:\Program Files\Git\cmd
应该是什么时候
C:\Program Files\Git\bin
由于远程计算机中有jenkins代理,我必须重新启动代理才能在主机中重新加载路径更改。上述答案很有帮助。但仍然存在“对于git存储库来说似乎不是”问题exists@user3093983这是你要问的另一个问题。