mmr*_*mmr 11 git hudson git-fetch
我正在尝试从github获取一个只读的git存储库,并通过hudson构建它.这个过程失败了.
这是哈德森的输出:
Started by an SCM change
Checkout:workspace / d:\hudson\home\jobs\gdcm-hudson\workspace - hudson.remoting.LocalChannel@19ba1d8
Using strategy: Default
Checkout:workspace / d:\hudson\home\jobs\gdcm-hudson\workspace - hudson.remoting.LocalChannel@19ba1d8
GitAPI created
Fetching changes from the remote Git repository
Fetching upstream changes from git://github.com/malaterre/gdcm.git
[workspace] $ "C:\Program Files (x86)\Git\bin\git.exe" fetch -t git://github.com/malaterre/gdcm.git +refs/heads/*:refs/remotes/origin/*
[workspace] $ "C:\Program Files (x86)\Git\bin\git.exe" ls-tree HEAD
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:674)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:641)
at hudson.FilePath.act(FilePath.java:753)
at hudson.FilePath.act(FilePath.java:735)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:641)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
at hudson.model.Run.run(Run.java:1273)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:129)
Run Code Online (Sandbox Code Playgroud)
当我直接通过git bash命令行运行该fetch命令时,我得不到响应(我认为这意味着它有效).
我看了这个可能的解决方案:http: //issues.hudson-ci.org/browse/HUDSON-7141?page = com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
但是使用该版本的插件并没有改变这种行为.
我还没有得到它与cmake合作,只是一直下载.我怎样才能让它发挥作用?
编辑:这个问题不是在Windows上使用Gud插件为Hudson进行问题克隆/获取存储库的一个问题,因为我没有在服务器上作为服务运行.
是的,我刚刚解决了这个问题.如果你打开一个Windows资源管理器,d:\hudson\home\jobs\gdcm-hudson\workspace你应该能够看到一个.git目录,而不是其他任何东西.应该有一个工作副本,但没有.要解决此问题,您必须通过运行来"填充"存储库
git pull git://github.com/malaterre/gdcm.git
Run Code Online (Sandbox Code Playgroud)
这应该d:\hudson\home\jobs\gdcm-hudson\workspace在.git目录旁边创建一堆其他文件,你应该能够在hudson中执行构建.