Jenkins error cloning remote repo origin

ERROR: Error cloning remote repo ‘origin’ #175 Comments after upgrade docker image from jenkins/jnlp-slave:4.0.1-1 to jenkins/inbound-agent:4.3-4 , the git plugin failed with the following error: upgrade jenkins master’s image jenkins/jenkins:lts didn’t work. switch back to the old version jenkins/jnlp-slave:4.0.1-1 solved the error. Avoiding the use of git plug-ins can also solve this problem: The […]

Содержание

  1. ERROR: Error cloning remote repo ‘origin’ #175
  2. Comments
  3. Footer

ERROR: Error cloning remote repo ‘origin’ #175

after upgrade docker image from jenkins/jnlp-slave:4.0.1-1 to jenkins/inbound-agent:4.3-4 , the git plugin failed with the following error:

upgrade jenkins master’s image jenkins/jenkins:lts didn’t work.

switch back to the old version jenkins/jnlp-slave:4.0.1-1 solved the error.

Avoiding the use of git plug-ins can also solve this problem:

The text was updated successfully, but these errors were encountered:

@MarkEWaite any ideas on this?

I’m also having the same issue

@nexaddo the message indicates an incorrect credential or repository URL is being used.

The repository URL is an HTTP URL but the «permission denied» message is for a public key. Public key authentication is used by git for ssh based repositories. The repository URL in that exception is an HTTP URL. Username / password authentication must be used for HTTP and HTTPS repository URLs.

I am also seeing the same problem, the same creds work with the older agent.

It uses the same URL on the older agent image with a public key?

@nexaddo the message indicates an incorrect credential or repository URL is being used.

The repository URL is an HTTP URL but the «permission denied» message is for a public key. Public key authentication is used by git for ssh based repositories. The repository URL in that exception is an HTTP URL. Username / password authentication must be used for HTTP and HTTPS repository URLs.

I make a custom image based on jenkins/inbound-agent:4.3-4 , which add the command below:

this caused git use ssh instead of http .

in this case, the git plugin did not work:

but this works as expected:

they both works when I use jenkins/jnlp-slave:4.0.1-1 as my base image.

C:Program FilesGitbin init C:ProgramDataJenkins.jenkinsworkspacedockerProject # timeout=10
ERROR: Error cloning remote repo ‘origin’
hudson.plugins.git.GitException: Could not init C:ProgramDataJenkins.jenkinsworkspacedockerProject
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1042)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:797)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
at hudson.scm.SCM.checkout(SCM.java:540)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
what would be the problem

It could be a permissions issue with the file system. It could be that the git.exe program is not in the path. It could be many things.

The issue tracker is used to track issues. Your request seems to be a request for help.

Please use the mailing lists and the chat channels for questions.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

ok I will try that.  This was a new bug I filed this morning so I don’t know how it got merged onto this one.

I created a new issue.  It is breaking or production stack with over 700 jobs and over 400 users

gjphilp Gregor Philp
added a comment — 2019-01-08 23:37 ok I will try that.  This was a new bug I filed this morning so I don’t know how it got merged onto this one.

I created a new issue.  It is breaking or production stack with over 700 jobs and over 400 users

Mark Waite

ok this is not easy.

I’ve tried contacting both the users and dev email addresses on the  Jenkins users mailing list and both just get returned emails saying the group does not exist.

What is the jenkins support mailing list?

gjphilp Gregor Philp
added a comment — 2019-01-09 00:00 Mark Waite

ok this is not easy.

I’ve tried contacting both the users and dev email addresses on the   Jenkins users mailing list and both just get returned emails saying the group does not exist.

What is the jenkins support mailing list?

Send an e-mail message to jenkinsci-users@googlegroups.com . Due to spam, your first posting to the mailing list will be held until it is approved.

If that doesn’t work, then connect to Gitter

The users mailing list is where users support each other. Internet Relay Chat is also used so that users can support each other.

CloudBees also sells support contracts for Jenkins for those that need the power of a commercial support team.

markewaite Mark Waite
added a comment — 2019-01-09 00:09edited Send an e-mail message to jenkinsci-users@googlegroups.com . Due to spam, your first posting to the mailing list will be held until it is approved.

If that doesn’t work, then connect to Gitter

The users mailing list is where users support each other. Internet Relay Chat is also used so that users can support each other.

CloudBees also sells support contracts for Jenkins for those that need the power of a commercial support team.

yeah thats the one I sent to and also tried to subscribe like it mentioned.  Both failed telling me the group does not exist.

Now I guess I have to try gitter

gjphilp Gregor Philp
added a comment — 2019-01-09 00:26 yeah thats the one I sent to and also tried to subscribe like it mentioned.  Both failed telling me the group does not exist.

Now I guess I have to try gitter

If neither of those work, then please open a bug report with the answers to my questions. I don’t know if I will have time to help you, but that’s probably better than nothing.

markewaite Mark Waite
added a comment — 2019-01-09 01:40 If neither of those work, then please open a bug report with the answers to my questions . I don’t know if I will have time to help you, but that’s probably better than nothing.

1)  ERROR: Error cloning remote repo … fatal: I don’t handle protocol ‘ssh’. Detail stack trace below:


ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://<gituser>@<githost>:<port>/<GIT_REPO_NAME>.git
+refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: I don't handle protocol '
ssh'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)

Root cause and possible solution: The above issue can be caused by many things, but one you never suspect from the error message itself is that it is caused by some extra character(s) in GIT URL that you can’t see on the Jenkins UI. Specifically if you have copied your GIT URL from another web page. Just delete the GIT URL in your pipeline script and retype it manually (instead of copying), it may solve the issue.

2) Error: java.lang.NoSuchMethodError: No such DSL method ‘findFiles’ found among steps…


Root cause and possible solution: The DSL methods are related to the Jenkins DSL execution engine or one of the Plugins. In this particular case, make sure pipeline-utility-steps (pipeline-utility-steps.jpi) plugin is installed. For more info visit https://plugins.jenkins.io/pipeline-utility-steps

3) Error: java.lang.NoSuchMethodError: No such DSL method ‘httpRequest’ found among steps…

Root cause and possible solution: In this particular case, make sure httpRequest (http_request.hpi) plugin is installed. For more info visit https://jenkins.io/doc/pipeline/steps/http_request/

4) Error: java.lang.NoSuchMethodError: No such DSL method ‘sshagent’ found among steps…


Root cause and possible solution: In this particular case, make sure sshAgent (ssh-agent.hpi ) plugin (http_request.hpi) plugin is installed. For more info visit https://wiki.jenkins.io/display/JENKINS/SSH+Agent+Plugin

5) Error: java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider…


java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider.
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.initRemoteAgent(SSHAgentStepExecution.java:175)
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.start(SSHAgentStepExecution.java:63)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:270)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:178)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

Root cause and possible solution: This error means that the sshAgent plugin is not able to locate the sshAgent provider in the path. Mostly, you may encounter this issue if you are running Jenkins on Windows. In order to resolve this issue on Windows, I downloaded the Portable GIT (https://git-scm.com/download/win) and put %PORTABLE_GIT_HOME%usrbin directory in my System path. This directory has ssh-agent.exe file. Make sure to launch new command window and restart the Jenkins.

You may be interested reading the following Jenkins related blog:
Jenkins Job Chain and How to Resolve Issue with Parameter Passing
How to Retrieve Info Using Jenkins Remote Access API

6) You are using Maven Pipeline Plugin and you get  [ERROR] Java heap space


[ERROR] Java heap space -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

Root cause and possible solution: Because of insufficient Java heap space, it is running out of memory. The easiest solution is to use Maven JVM Options to specify the maximum (or min & max both) heap size that your process needs. You can use ‘mavenOpts‘ within ‘withMaven‘ step. Below is an example:


stage('Build') {
withMaven(
  mavenSettingsConfig: '9d2a7048-91b1-47a8-8788-be4b89b71128', jdk: jdk.toString(), maven: 'Maven 3.3.9', mavenOpts: '-Xmx2048m') {
    bat 'mvn clean package'
      }
}

Important: before increasing the heap size, make sure you have sufficient physical memory (RAM) available. If your Java process can not reserve specified heap space, then you may get error saying «Error occurred during initialization of VMCould not reserve enough space for 2097152KB object heap«. Which means either there is not enough physical memory available in the server for Java to reserve specified heap space (2 GB in this case) or other server/OS settings (like 32 JVM on Windows has around 1.6 GB heap limitation) preventing Java to reserve specified heap size. 

5 answers to this question.

ERROR: Error cloning remote repo 'origin'

hudson.plugins.git.GitException: Could not init F:jenkins_remotedirectoryworkspacewindowsCompile

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:813)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:605)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)

at hudson.remoting.UserRequest.perform(UserRequest.java:212)

at hudson.remoting.UserRequest.perform(UserRequest.java:54)

at hudson.remoting.Request$2.run(Request.java:369)

at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)

at java.lang.Thread.run(Unknown Source)

Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 192.168.111.1/192.168.111.1:54960

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)

at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)

at hudson.remoting.Channel.call(Channel.java:957)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)

at com.sun.proxy.$Proxy80.execute(Unknown Source)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)

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

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 "C:UsersSiraj_MuneeraDownloadssoftwaresGit-2.21.0-64-bit.exe init F:jenkins_remotedirectoryworkspacewindowsCompile" returned status code -1:

stdout: 

stderr: 

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2010)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2006)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1638)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:811)

... 12 more

ERROR: Error cloning remote repo 'origin'
Finished: FAILURE

This was the error when i tried to build a jenkins job on the windows slave agent. I resolved it by correctly configuring the Git.exe location on my windows slave agent.

Go to Manage jenkins -> Manage nodes -> click on the windows_slave agent -> Configure

Under Node properties -> tool locations-> Specify the correct path of your Git.exe (In case you don’t know the location of git on your machine,run «where git» command) -> save.






answered

Jun 3, 2019


by
Sirajul


• 59,210 points



Related Questions In Git & GitHub

Понравилась статья? Поделить с друзьями:
  • Jeep ошибка p0138
  • Job for netctl failed because the control process exited with error code arch
  • Jeep ошибка p0108
  • Job for named service failed because the control process exited with error code
  • Jdoodle asm 1 error parser instruction expected