简体   繁体   中英

Jenkins job failing - Cloudbees + Git

I'm working on a project that has a private git repo hosted on premise. Pushing some code through Jenkins which uses CloudBees to push the code on to the server. Recently made a branch called rc - we usually have the staging site pointed to the staging branch, but recently pointed it to the new rc branch. The production site is pointed to the master branch. I've reverted a recent merge, recent commits back to when I was able to push code to PRD server, but still get the error below. Any one ever ran in to this issue? I've tried pruning as well.

> 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)

Here is the git log 在此处输入图片说明

As mentioned here , you could have other branches named rc/xxx :

  • either in your remote repo origin . ( git remote show origin to check that)
  • or in your local repo ( git branch -r to see that, in the Jenkins workspace)

Check first if your can clone the same repo locally on your workstation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM