我正在使用带有 hudson 的 git 来构建一些测试的项目。我已经完成了所有的 hudson 配置(至少我认为我做了)并且我下载了 git for windows。该存储库位于我们办公室的 linux 机器上。当我在这里构建测试是我得到的错误:
Started by user anonymous
Checkout:workspace / C:\Users\username\.hudson\jobs\GitTest\workspace - hudson.remoting.LocalChannel@35e5abf2
Using strategy: Default
Checkout:test2 / C:\Users\username\git\test2 - hudson.remoting.LocalChannel@35e5abf2
Fetching changes from the remote Git repository
Fetching upstream changes from user@gitrepo:/var/gitrepo/test
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: C:\Program Files (x86)\Git\cmd\git.exe fetch -t user@gitrepo:/var/gitrepo/test +refs/heads/master:refs/remotes/origin/master
null
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$3.invoke(GitSCM.java:931)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
at hudson.FilePath.act(FilePath.java:791)
at hudson.FilePath.act(FilePath.java:773)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:668)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1515)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:521)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:428)
at hudson.model.Run.run(Run.java:1390)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:40)
at hudson.model.ResourceController.execute(ResourceController.java:81)
at hudson.model.Executor.run(Executor.java:137)
由于某种原因,fetch 命令返回 null。当我在命令行上尝试该命令时,它只是挂起而没有输出,直到我不得不杀死它。我已经研究了一段时间,但找不到任何答案。
任何帮助将非常感激。