【发布时间】:2011-06-11 05:33:30
【问题描述】:
我们在 Windows Server 2003 Enterprise 上使用 Git + OpenSSH 设置了 Hudson,它工作了一段时间。 然后突然,它开始在克隆期间一直挂在 12%,我们怀疑文件可能太大了。 (它在所有其他机器上仍然可以正常工作,Windows Server 2003 标准,Windows 7 企业版),只有这台服务器。
所以我们改用了 Putty 而不是 OpenSSH,它在 gitBash 和 gitExtensions 上工作,但在 Hudson 上仍然失败。 由于我已经读到对于 plink 正确加载 ssh 密钥存在一些问题,因此我将 GIT_SSH 设置为一个脚本,该脚本将使用密钥加载 putty 并且可以从 gitBASH 正常工作,但它仍然无法使用 Hudson。
这是使用 PUTTY 失败的输出:
Started by user anonymous
Checkout:workspace / <http://WINDOWS2003SERVER:8080/job/PROJECT/ws/> - hudson.remoting.LocalChannel@1c57a92
Using strategy: Default
Last Built Revision: Revision 2a56d9738e7c0af810e70e2e2051c41bd44f4252 (origin/master) Checkout:workspace / <http://WINDOWS2003SERVER:8080/job/PROJECT/ws/> - hudson.remoting.LocalChannel@1c57a92
GitAPI created
Cloning the remote Git repository
Cloning repository origin
$ C:\bin\Git\bin\git clone -o origin git@GITSERVER:project.git <http://WINDOWS2003SERVER:8080/job/PROJECT/ws/>
ERROR: Error cloning remote repo 'origin' : Could not clone git@GITSERVER:project.git
ERROR: Cause: Error performing C:\bin\Git\bin\git clone -o origin git@GITSERVER:project.git <http://WINDOWS2003SERVER:8080/job/PROJECT/ws/>
Command returned status code 128: Cloning into <http://WINDOWS2003SERVER:8080/job/PROJECT/ws/...>
fatal: The remote end hung up unexpectedly
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:809)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:740)
at hudson.FilePath.act(FilePath.java:756)
at hudson.FilePath.act(FilePath.java:738)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:740)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1171)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:480)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:412)
at hudson.model.Run.run(Run.java:1362)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
我们对我们的 SSH 协议并不严格,只要它有效,如果有人能告诉我为什么使用 openSSH 会失败,或者为什么 Hudson 使用 putty 和任何解决方案失败,我将非常感激!!
【问题讨论】:
-
我们有一个在 fedora 上运行的 git 服务器,并且有完美的工作偶尔会出现这个 128 错误。它们大部分都在运行,而且键都很好,但我们无法解释为什么有时 git 交互会像这样爆炸。
标签: git hudson windows-server-2003 putty openssh