-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
Jenkins ver. 2.138.1
Pipeline: Multibranch 2.20
Pipeline: Shared Groovy Libraries 2.12
Git Plugin 3.9.1
Git Client Plugin 2.7.3
Kubernetes plugin 1.12.6
Loading shared library via Jenkinsfile. It works for a while, but then the error "ERROR: Error fetching remote repo 'origin'" is generated. The only way to remove the fault is to clear the workspace for the job.
Jenkinsfile:
library identifier: 'myshared@master', retriever: modernSCM([$class: 'GitSCMSource',
remote: 'https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared',
credentialsId: 'MY_CREDENTIALS',
branch: 'master',
excludes: '',
includes: '*',
rawRefSpecs: 'refs/heads/master'
]) _
Error log:
Loading library myshared@master
Attempting to resolve master from remote references...
> git --version # timeout=10
using GIT_ASKPASS to set credentials CREDENTIALS > git ls-remote https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared# timeout=10
Found match: refs/heads/master revision 9b1346587485736e0d09c107464b73efdd3088ac
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared # timeout=10
Fetching without tags
Fetching upstream changes from https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared
> git --version # timeout=10
using GIT_ASKPASS to set credentials CREDENTIALS
> git fetch --no-tags --progress https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared +refs/heads/:refs/remotes/origin/
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared
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 org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:116)
at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrieve(SCMSourceRetriever.java:86)
at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:157)
at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:207)
at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:156)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://xxxxxxxx/pipeline-shared/jenkins-pipeline-shared +refs/heads/:refs/remotes/origin/" returned status code 255:
stdout:
stderr: error: cannot open .git/FETCH_HEAD: Invalid argument
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
... 16 more
ERROR: Error fetching remote repo 'origin'