我想在Windows Server 2012機器上設置Jenkins,並且遇到很多困難。詹金斯掛在「從原點獲取上游變化」
我做的事:
- 創建一個密碼的
id_rsa
和id_rsa.pub
- 創建使用
ssh.exe -T bitbucket.org
並接受添加主機known_hosts
文件bitbucket.org。 - 增加
E:
全系統的HOME變量 - 我已經添加了這些文件
C:/Windows/SysWOW64/config/systemprofile/.ssh
以及E:/.ssh
- 我聯繫我的公鑰到位桶作爲部署的關鍵。
- 我有三重檢查了所有我的網址,用戶名等
- 我甚至手動從倉庫拉到建立的初始基地
C:/Program Files (x86)/Jenkins/jobs/MyProject/workspace/
然而它仍然在
掛起Building in workspace C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace
Checkout:workspace/C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace - [email protected]
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
我給了它大約20分鐘,所以它不是回購問題的速度/大小。如果我取消,這是返回什麼:
ERROR: Problem fetching from origin/origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:\Program Files (x86)\Git\bin\git.exe fetch -t origin +refs/heads/*:refs/remotes/origin/*
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:780)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:739)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:160)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:793)
at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:976)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
at hudson.model.Run.execute(Run.java:1575)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(Native Method)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:360)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:769)
... 19 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$2.invoke(GitSCM.java:981)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
at hudson.model.Run.execute(Run.java:1575)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
我在這裏我束手無策,所以我感謝所有幫助我能。 這裏有幾個我已經嘗試過沒有任何改進的文章。
Authenticate Jenkins CI for Github private repository
Permission denied (publickey) when setting up Jenkins
Hudson Git Plugin not working on windows
http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64
這是一個PATH問題? (http://blog.cgdecker.com/2011/02/git-clone-error-on-jenkinshudson-on.html) – VonC
從Jenkins的運行實例中檢查HOME(如http://blog.hlyh .dk/2011/07/debugging-hudson-git-plugin-hanging.html) – VonC
我也有這個問題。令人沮喪的是,它有時會起作用,有時卻不起作用。所以一切都必須正確配置,但它只是隨機失敗。 –