Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - Error fetching remote repo 'origin'

I'm trying to setup the Jenkins Github Pull-Request Builder on a Jenkins node slave, however when I set the refspec to +refs/pull/*:refs/remotes/origin/pr/*.

The build fails, saying that I couldn't fetch the repo, When the refspec removed, keeping everything else in place (Github pull request builder ticked and configured, branch specifier is set to ${sha1} defaulted to master using string parameter, the build is fine.

Here is the error trace:

git -c core.askpass=true fetch --tags --progress [email protected]:organization/repository.git
+refs/pull/*:refs/remotes/origin/pr/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from [email protected]:organization/repository.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    at hudson.model.Run.execute(Run.java:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress [email protected]:organization/repository.git +refs/pull/*:refs/remotes/origin/pr/*" returned status code 1:

Any help would be greatly appreciated.

like image 711
nhs Avatar asked Dec 01 '25 00:12

nhs


1 Answers

Try:

  1. clearing out the workspace files of the required job.

  2. rebuilding.

like image 119
Gavriel Cohen Avatar answered Dec 02 '25 16:12

Gavriel Cohen