我正在尝试从 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)
当我直接通过 git bash 命令行运行该 fetch 命令时,我没有得到任何响应(我认为这意味着它有效)。
我查看了这个可能的解决方案:http://issues.hudson-ci.org/browse/HUDSON-7141?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel http://issues.hudson-ci.org/browse/HUDSON-7141?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
但使用该版本的插件并没有改变这种行为。
我什至还没有让它与 cmake 一起工作,只是一致地下载。我怎样才能让它发挥作用?
编辑:这个问题不是重现在 Windows 上使用 Hudson 的 Git 插件克隆/获取存储库时出现问题 https://stackoverflow.com/questions/2370371/problem-cloning-fetching-repository-using-git-plugin-for-hudson-on-windows,因为我没有作为服务器上的服务运行。
是的,我刚刚解决了这个问题。如果您打开 Windows 资源管理器d:\hudson\home\jobs\gdcm-hudson\workspace
你应该能够看到.git
目录,没有其他内容。应该有一个工作副本,但没有。要解决此问题,您必须通过运行来“启动”存储库
git pull git://github.com/malaterre/gdcm.git
这应该会在中创建一堆其他文件d:\hudson\home\jobs\gdcm-hudson\workspace
沿着 .git 目录,您应该能够在 Hudson 中执行构建。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)