詹金斯悬挂在“从原点获取上游变化” [英] Jenkins hanging at "Fetching upstream changes from origin"

查看:125
本文介绍了詹金斯悬挂在“从原点获取上游变化”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows Server 2012计算机上设置Jenkins,并且遇到了很多困难。



我所做的事情:




  • 创建了无密码的 id_rsa id_rsa。 pub

  • 使用 ssh.exe为bitbucket.org创建一个 known_hosts 文件-T bitbucket.org ,并接受添加主机。 HOME变量

  • 我已经将这些文件添加到 C:/Windows/SysWOW64/config/systemprofile/.ssh 以及 E:/。ssh

  • 我已将我的公钥连接到Bitbucket作为部署密钥。
  • 我已经三次检查了我的所有网址,用户名等。

  • 我甚至还手动从存储库中取出,在 C :/ Program Files(x86)/ Jenkins / jobs / MyProject / workspace /



挂在

 建立在工作区C: \\ Program Files(x86)\Jenkins \jobs\MyProject\workspace 
Checkout:workspace / C:\ Program Files(x86)\Jenkins\jobs\MyProject\workspace - hudson。 remoting.LocalChannel@13ca972
使用策略:默认
从1个远程Git存储库获取更改
获取源自上游的更改

我给了它大约20分钟的时间,所以它不是回购问题的速度/大小。如果我取消,则返回:

 错误:从原点/原点提取问题 - 可能无法使用。继续无论如何
hudson.plugins.git.GitException:执行命令时出错:C:\ Program Files(x86)\Git\bin\git.exe fetch -t origin + refs / heads / *:refs /遥控器/产地/ *
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:780)
在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)
在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)
。在hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
在jenkins.scm.SCMCheckoutStrategy.checkout(
at hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:575)
at hudson.model.Run.execute(Run.java:1575)
($ SCCheckoutStrategy.java:88)在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
在hudson.model.ResourceController.execute(ResourceController.java:88)
在hudson.model.Executor.run(Executor.java :237)
导致:java.lang.InterruptedException $ b $在java.lang.ProcessImpl.waitFor(本地方法)
在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更多
错误:无法从任何存储库获取
致命错误:无法从任何存储库获取
hudso n.plugins.git.GitException:无法从hudson.plugins.git.GitSCM上的任何存储库
中获取$ 2.invoke(GitSCM.java:981)
at hudson.plugins.git.GitSCM $ 2。在hudson.FilePath.act(FilePath.java:865)上
在hudson.FilePath.act(FilePath.java:838)
处调用(gitSCM.java:942)
在hudson.plugins处
.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
在hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
在hudson.model.AbstractProject.checkout(AbstractProject.java :在jenkins.scm.SCMCheckoutStrategy.checkout 1364)
。在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
(SCMCheckoutStrategy.java:88)
。在哈德森。 model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:575)
在hudson.model.Run.execute(Run.java:1575)
在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java: 46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)

我在这里结束了自己的工作,所以我非常感谢所有的帮助。
以下是我尝试过的几篇文章,没有任何改进。


为Github私人存储库验证Jenkins CI /stackoverflow.com/questions/6515039/jenkins-git-permission-denied-publickey\">设置詹金斯时拒绝(publickey)



b
$ b

http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64

解决方案

以下是我解决类似问题的方法:

Msysgit会安装两个 git.exe 。一个位于 C:\程序文件(x86)\Git\bin 下,另一个位于 C:\程序文件(x86) \Git\cmd 。第一个不能与詹金斯一起使用。它会在完成它的工作后挂起。第二个完美工作。

更新您的Jenkins Git设置以指向正确的 cmd \git.exe 并享受!


I'm trying to set up Jenkins on a Windows Server 2012 machine, and I'm having a lot of difficulty.

Things I've done:

  • Created a password-less id_rsa, and id_rsa.pub
  • Created a known_hosts file for bitbucket.org using ssh.exe -T bitbucket.org and accepting to add the host.
  • Added E: to System-wide HOME Variable
  • I've added those files to C:/Windows/SysWOW64/config/systemprofile/.ssh as well as E:/.ssh
  • I've linked my public key to Bitbucket as a deployment key.
  • I've triple-checked all my URLs, usernames, etc.
  • I've even manually pulled from the repository to setup an initial base in C:/Program Files (x86)/Jenkins/jobs/MyProject/workspace/

And yet it still hangs at

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

I've given it about 20 minutes, so it's not a speed / size of the repo issue. If I cancel, this is what is returned:

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)

I'm at my wits end here, so I appreciate all the help I can get. Here are a choice few articles which I've tried with no improvement.

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

解决方案

Here's how I fixed a similar issue:

Msysgit installs two git.exe. One under C:\Program Files (x86)\Git\bin and a second one under C:\Program Files (x86)\Git\cmd. The first one cannot be used with Jenkins. It will hang after completing it's job. The second one works perfectly.

Update your Jenkins Git settings to point to the correct cmd\git.exe and enjoy!

这篇关于詹金斯悬挂在“从原点获取上游变化”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆