我正在尝试在 Windows Server 2012 机器上设置 Jenkins,但遇到了很多困难。
我做过的事情:
- 创建了一个无密码的
id_rsa
,并且id_rsa.pub
- 使用并接受添加主机
known_hosts
为 bitbucket.org创建了一个文件。ssh.exe -T bitbucket.org
- 添加
E:
到系统范围的 HOME 变量 - 我已经将这些文件添加
C:/Windows/SysWOW64/config/systemprofile/.ssh
到E:/.ssh
- 我已将我的公钥作为部署密钥链接到 Bitbucket。
- 我已经三次检查了我所有的 URL、用户名等。
- 我什至手动从存储库中提取以设置初始基础
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 - hudson.remoting.LocalChannel@13ca972
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)
我在这里束手无策,所以我很感激我能得到的所有帮助。这是我尝试过的几篇文章,但没有任何改进。
http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64