gpt4 book ai didi

git - Hudson git 插件不会在 Linux 上克隆 repo

转载 作者:太空狗 更新时间:2023-10-29 14:21:28 26 4
gpt4 key购买 nike

好吧,我在 github 上的 repo 被克隆到运行 Fedora 8 的 Hudson 服务器上时遇到了一些问题。输出是 git 遇到错误时的常见错误输出:

Started by user anonymous
Checkout:workspace / /home/tomcat/.hudson/jobs/CIExample/workspace - hudson.remoting.LocalChannel@3861e6
Using strategy: Default
Checkout:workspace / /home/tomcat/.hudson/jobs/CIExample/workspace - hudson.remoting.LocalChannel@3861e6
GitAPI created
Cloning the remote Git repository
Cloning repository origin
$ git clone -o origin https://mattupstate@github.com/mattupstate/CIExample.git /home/tomcat/.hudson/jobs/CIExample/workspace
ERROR: Error cloning remote repo 'origin' : Could not clone https://mattupstate@github.com/mattupstate/CIExample.git
ERROR: Cause: Error performing git clone -o origin https://mattupstate@github.com/mattupstate/CIExample.git /home/tomcat/.hudson/jobs/CIExample/workspace
Trying next repository
ERROR: Could not clone from a repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:587)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:535)
at hudson.FilePath.act(FilePath.java:753)
at hudson.FilePath.act(FilePath.java:735)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:535)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1044)
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:1257)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:127)

构建并没有像某些人报告的那样挂起。它立即失败。此外,如果我登录到我的盒子,切换到 tomcat 用户(运行 Tomcat 和 Hudson 的用户),然后运行此命令:

git clone -o origin https://mattupstate@github.com/mattupstate/CIExample.git /home/tomcat/.hudson/jobs/CIExample/workspace

它运行没有问题,并且 repo 已被克隆。我手动运行该命令时遇到的唯一问题是工作区文件夹是否已经存在。当我要克隆到的本地文件夹已经存在时,Git 不喜欢它。我有一种感觉,Hudson 正在尝试克隆之前创建该文件夹?

如有任何帮助,我们将不胜感激。

最佳答案

我在检查 Hudson (v 2.2.1) 上的 git 项目时遇到了类似的问题。我之前使用的是 subversion,那里有现有的工作区。因此,当我配置 Git 时,我选中了“在构建之前清除工作空间”选项,当在 hudson 上运行构建时,它清除了现有的工作空间并立即失败。我试着运行了几次,结果都是一样的。

当我取消选中“构建前清除工作空间”选项时,我的下一个构建和检查都没有任何问题。

有没有人用 git 在 hudson 上观察到这种行为。

关于git - Hudson git 插件不会在 Linux 上克隆 repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3189520/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com