Jenkins工作失败-Cloudbees + Git

时间:2018-09-20 17:52:58

标签: git jenkins cloudbees

我正在开发一个在内部托管了私人git存储库的项目。通过使用CloudBees将代码推送到服务器的Jenkins推送一些代码。最近创建了一个名为rc的分支-我们通常将暂存站点指向staging分支,但最近将其指向新的rc分支。生产站点指向master分支。我已经还原了最近的合并,最近的提交回溯到我能够将代码推送到PRD服务器的时间,但仍然收到以下错误。有人遇到过这个问题吗?我也尝试过修剪。

> git fetch --tags --progress git@github-wordpress:IST-Apps/Wordpress-Newsroom.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from git@github-wordpress:IST-Apps/Wordpress-Newsroom.git
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
        at hudson.scm.SCM.checkout(SCM.java:504)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
        at hudson.model.Run.execute(Run.java:1798)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:97)
        at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git@github-wordpress:IST-Apps/Wordpress-Newsroom.git +refs/heads/*:refs/remotes/origin/*" returned status code 1:
stdout: 
stderr: remote: Counting objects: 18, done.        
remote: Compressing objects:  16% (1/6)           
remote: Compressing objects:  33% (2/6)           
remote: Compressing objects:  50% (3/6)           
remote: Compressing objects:  66% (4/6)           
remote: Compressing objects:  83% (5/6)           
remote: Compressing objects: 100% (6/6)           
remote: Compressing objects: 100% (6/6), done.        
remote: Total 18 (delta 13), reused 17 (delta 12), pack-reused 0        
From github-wordpress:IST-Apps/Wordpress-Newsroom
   6b7b0dc..ff8b124  master     -> origin/master
error: there are still refs under 'refs/remotes/origin/rc'
! [new branch]      rc         -> origin/rc  (unable to update local ref)

这里是git log enter image description here

1 个答案:

答案 0 :(得分:0)

作为mentioned here,您可以有其他名为rc/xxx的分支机构:

  • 在您的远程仓库origin中。 (git remote show origin检查一下)
  • 或在您的本地存储库中(git branch -r在Jenkins工作区中查看)

首先检查您是否可以在工作站上本地克隆相同的存储库。