今天我开始使用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)
有没有办法为hudson提供我的git存储库shh键?
第二个问题:我还在我的VM上安装了hudson,它在端口8080上运行,但我的tomcat也在端口8080上运行。我试图更改哈德森的端口,但没有成功,For它在hudson.xml中,但我的VM在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上打开它时,它没有响应。
任何帮助都将受到高度赞赏。
谢谢
答案 0 :(得分:1)
通过在iptables
中添加端口12398的条目来解决第二个问题答案 1 :(得分:1)
我可以通过添加Windows环境变量解决您的第一个问题。
Name: HOME
Value: $USERPROFILE
了解更多信息,请访问此网址http://element34.ca/blog/jenkins-remote-windows-nodes-and-private-github-repos