【问题标题】:Hudson failed to clone git repository + Hudson PORT changeHudson 无法克隆 git 存储库 + Hudson PORT 更改
【发布时间】:2013-07-14 03:19:46
【问题描述】:

今天我开始使用 hudson 进行持续集成。我将它安装在我的 Windows 机器上,并按照关于安装和配置的书中所述配置了所有内容。我正在使用它的 git 插件从 git 存储库中获取并构建。

我的第一个问题和这个一样

Unable to Run Build on Hudson Using Git

我要从中克隆的 git 存储库是一个私有存储库,它使用 shh 密钥而无需解释。上述问题提出了删除在我的情况下根本不存在的释义的解决方案。

我也搜索并尝试了其他一些解决方案,但没有成功。

以下是跟踪日志

Started by user anonymous
Checkout:workspace / C:\Users\UIQBAL\.hudson\jobs\Test\workspace -   hudson.remoting.LocalChannel@14be0c6
Using strategy: Default
Checkout:workspace / C:\Users\UIQBAL\.hudson\jobs\Test\workspace -  hudson.remoting.LocalChannel@14be0c6
Fetching changes from the remote Git repository
Fetching upstream changes from git@vrtbichler11.informatik.tu-muenchen.de:wsc18
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:\Program Files   (x86)\SmartGitHg 4.5\git\bin\git.exe fetch -t git@vrtbichler11.informatik.tu-    muenchen.de:wsc18 +refs/heads/*:refs/remotes/origin/*
 null
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:744)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:706)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:193)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:960)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1617)
at hudson.plugins.git.GitSCM.access$900(GitSCM.java:107)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:954)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:919)
at hudson.FilePath.act(FilePath.java:791)
at hudson.FilePath.act(FilePath.java:773)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:919)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:698)
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:82)
at hudson.model.Executor.run(Executor.java:137)
 Caused by: java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(ProcessImpl.java:353)
at hudson.Proc$LocalProc.join(Proc.java:222)
at hudson.Launcher$ProcStarter.join(Launcher.java:273)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:731)
... 18 more
  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:961)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:919)
at hudson.FilePath.act(FilePath.java:791)
at hudson.FilePath.act(FilePath.java:773)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:919)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:698)
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:82)
at hudson.model.Executor.run(Executor.java:137)  

有没有办法将我的 git 存储库 shh 密钥提供给 hudson ?

第二个问题:我还在我的VM上安装了hudson,它在8080端口上运行,但我的tomcat也在8080端口上运行。我试图改变hudson的端口但没有成功,对于windows 它在 hudson.xml 中,但我的虚拟机在 fedora 上运行。

我尝试更改端口的是

stop hudson
vi /etc/sysconfig/hudson 
start hudson
check to see on which port hudson is running and it gives httpPort=12398 

 [root@wsc18 bin]# ps -ef| grep hudson | grep Port
 root     22604 22602  0 04:51 ?        00:00:00 runuser -s /bin/bash hudson -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/java -Djava.awt.headless=true -  DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war -- logfile=/var/log/hudson/hudson.log --daemon --httpPort=12398 --debug=5 -- handlerCountMax=100 --handlerCountMaxIdle=20
 hudson   22607 22604  0 04:51 ?        00:00:00 bash -c ulimit -S -c 0 >/dev/null 2>&1  ; /usr/bin/java -Djava.awt.headless=true -DHUDSON_HOME=/var/lib/hudson -jar  /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log --daemon --httpPort=12398 - -debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
 hudson   22608 22607 14 04:51 ?        00:00:07 /usr/bin/java -Djava.awt.headless=true   -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war -- logfile=/var/log/hudson/hudson.log --daemon --httpPort=12398 --debug=5 -- handlerCountMax=100 --handlerCountMaxIdle=20

当我在 vmlocalhost:12398 上打开它时,它没有响应。

我们将不胜感激。

谢谢

【问题讨论】:

    标签: git continuous-integration hudson fedora


    【解决方案1】:

    通过在 iptables 中添加端口 12398 的条目来解决第二个问题

    【讨论】:

      【解决方案2】:

      我可以通过添加 windows 环境变量来解决您的第一个问题。

      Name: HOME
      Value: $USERPROFILE
      

      欲了解更多信息,请访问此 URL http://element34.ca/blog/jenkins-remote-windows-nodes-and-private-github-repos

      【讨论】:

        猜你喜欢
        • 2011-06-11
        • 1970-01-01
        • 2012-02-13
        • 1970-01-01
        • 1970-01-01
        • 2021-09-01
        • 2018-11-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多