致命:无效的ID Jenkins IIS [英] FATAL: Invalid ID Jenkins IIS

查看:230
本文介绍了致命:无效的ID Jenkins IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在IIS 8.5 Server 2012 r2上使用这个工具。我试图设置Jenkins来从bitbucket中建立一个项目。我设置了Git和Bitbucket插件。



我已经创建了一个项目,内容如下:

  Branch Specifier(空白表示'any'):origin / master

我不确定这是否是问题的一部分,但我的回购中只有一个分支。



运行构建时, m得到以下错误,我找不到任何有关该ID是无效的信息,任何人都可以指向正确的方向吗?



它看起来像是从最后一次提交获取哈希,然后说无效ID,我不确定这是哈希ID还是它是某种环境ID,因为它引用构建目录(它存在且具有正确的权限)

错误日志: b在工作区C中建立:\程序文件(x86)\Jenkins\workspace\Fenix
> C:\ Program Files \Git\git-cmd.exe rev-parse --is-inside-work-tree#timeout = 10
从远程Git存储库获取更改
> C:\ Program Files \Git\git-cmd.exe config remote.origin.url https://user@bitbucket.org/project/project-fenix.git#timeout = 10
获取上游更改从https://user@bitbucket.org/project/project-fenix.git
> C:\程序文件\Git\git-cmd.exe --version#timeout = 10
使用GIT_ASKPASS设置凭据
> C:\ Program Files \Git\git-cmd.exe fetch --tags https://user@bitbucket.org/project/project-fenix.git + refs / heads / *:refs / remotes / origin / *
> C:\ Program Files \Git\git-cmd.exe rev-parserefs / remotes / origin / master ^ {commit}#timeout = 10
致命错误:无效的ID:C:\ Program文件(x86)\Jenkins\workspace\Fenix>
org.eclipse.jgit.errors.InvalidObjectIdException:无效的ID:C:\程序文件(x86)\Jenkins\workspace\Fenix>
at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:232)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:689)
在hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
at hudson.plugins.git.util.DefaultBuildChooser.getHeadRevision(DefaultBuildChooser.java:130)
at hudson.plugins.git .util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:112)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:992)
at hudson.plugins.git.GitSCM.checkout(GitSCM .java:1095)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at hudson。 model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild。 java:529)hudso
在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
(在hudson.model.ResourceController.execute中)
(ResourceController.java: 98)
at hudson.model.Executor.run(Executor.java:404)
完成:FAILURE

我已经看到很多地方引用使用 git.cmd 而不是 .exe ,但我的Git目录中不存在cmd文件。如果我使用任何 .exe 文件超时并且无法建立连接,那么我使用 C:\程序文件\ Git \git-cmd.exe 并且至少连接。



Git verion是Git for Windows v2.10.2



如果任何人都可以指出我正确的方向,将不胜感激,因为我无法找到任何关于这个特定错误的信息。

解决方案

不要使用git-cmd.exe作为Jenkins的git实现。使用git安装的bin目录中的git.exe,或者从git instalaltion的cmd目录中使用git.exe。它运行得更好,经过测试,并且是受支持的方式。

据我所知,git-cmd.exe是捆绑在git中的程序,用于启动一个包含git的Windows命令处理器。我印象中它运行任何git命令,但它似乎这样做。它不会运行所有的git命令,而是提供新颖而有趣的错误消息。



请参阅 JENKINS-45212 ,该例子表示这种形式的git程序行为不正确,而 git.exe 表现得如预期。


I'm trying to set up Jenkins to pull and build a project from bitbucket.

I'm using this on IIS 8.5 Server 2012 r2. I've set up the Git and Bitbucket plugins.

I've set up a project with the following:

Branch Specifier (blank for 'any'): "origin/master"

I'm not sure if this is part of the issue, but I only have that one branch in my repo.

When running the build I'm getting the following error, I can't find any information as to what the ID is that's invalid, can anyone point me in the right direction?

It looks like it's fetching the hash from the last commit, and then saying invalid ID, I'm not sure if that's the hash ID or if it's some kind of environmental ID as it's referencing the build directory (which does exist and has the correct permissions) when it fails

Error log:

Started by user Stu
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Fenix
 > C:\Program Files\Git\git-cmd.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files\Git\git-cmd.exe config remote.origin.url https://user@bitbucket.org/project/project-fenix.git # timeout=10
Fetching upstream changes from https://user@bitbucket.org/project/project-fenix.git
 > C:\Program Files\Git\git-cmd.exe --version # timeout=10
using GIT_ASKPASS to set credentials 
 > C:\Program Files\Git\git-cmd.exe fetch --tags https://user@bitbucket.org/project/project-fenix.git +refs/heads/*:refs/remotes/origin/*
 > C:\Program Files\Git\git-cmd.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
FATAL: Invalid id: C:\Program Files (x86)\Jenkins\workspace\Fenix>
org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id: C:\Program Files (x86)\Jenkins\workspace\Fenix>
    at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:232)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:689)
    at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
    at hudson.plugins.git.util.DefaultBuildChooser.getHeadRevision(DefaultBuildChooser.java:130)
    at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:112)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:992)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1095)
    at hudson.scm.SCM.checkout(SCM.java:495)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1728)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE

I've seen a lot of places reference using git.cmd instead of the .exe, but no cmd file exists in my Git directory. If I use any of the .exe files it times out and cannot make a connection, so I'm using C:\Program Files\Git\git-cmd.exe and it is at least connecting.

The Git verion is Git for Windows v2.10.2

If anyone could point me in the right direction that would be greatly appreciated as I can't find anything online about this specific error.

解决方案

Please don't use git-cmd.exe as the git implementation for Jenkins. Use git.exe from the bin directory of the git installation, or from the cmd directory of the git instalaltion. It works better, is tested, and is the supported way.

As far as I can tell, git-cmd.exe is the program bundled with git which is used to start a Windows command processor that includes git in the path. I'm impressed that it runs any git commands, but it seems to do so. It doesn't run all the git commands, and provides novel and interesting error messages instead.

Refer to JENKINS-45212 for an example of a use case where that form of the git program behaves incorrectly, while git.exe behaves as expected.

这篇关于致命:无效的ID Jenkins IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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