代码之家  ›  专栏  ›  技术社区  ›  Matt W

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

  •  3
  • Matt W  · 技术社区  · 15 年前

    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不喜欢我要克隆到的本地文件夹已经存在的情况。我有一种感觉哈德森是在试图复制之前创建那个文件夹?

    任何帮助都将不胜感激。

    4 回复  |  直到 15 年前
        1
  •  1
  •   Sreeni    11 年前

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

    有人在哈德逊和吉特身上观察到这种行为吗。

        2
  •  0
  •   Community CDub    8 年前

    你是不是 check your path
    请参阅 Git Hudson plugin .

    git “但是” /usr/bin/git “或者安装Git二进制文件的地方)。
    如果要执行基于文件系统的克隆,还应验证权限是否正确。

        3
  •  0
  •   Jesse Glick    13 年前

    我无法克隆 ssh://git@github.com/x/y.git 但可以克隆 git://github.com/x/y.git

        4
  •  0
  •   timkingman    13 年前

    我有一个ssh://git URL错误,问题是我没有安装Hudson“ssh插件”。