Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50711

plugin doesn't work with ssh link to git repo

    Details

    • Similar Issues:

      Description

      I have an error:

      "Command "/usr/bin/git ls-remote -h git@gitlab.site.com:name/project.git" returned status code 128: stdout: stderr: /tmp/ssh5744210594072786682.sh: line 6: ssh: command not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

       

      As a result, I have a build error: 
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      If I fill the field "Default value" to "master" instead of "**" - I don't have Revision error in build process, but "Git Parameter Plugin's" error above, still exist and I can't choose the branch.

      I use:

      Git Parameter Plug-In: 0.9.1

      Git plugin: 3.8.0

      Git client plugin: 2.7.1

        Attachments

          Issue Links

            Activity

            Hide
            klimas7 Boguslaw Klimas added a comment -

            Hi,

            I released plugin in version 0.9.11 where this issue was resolved, could you check that and confirm the issue is resolved

             
            Regards
            Boguslaw

            Show
            klimas7 Boguslaw Klimas added a comment - Hi, I released plugin in version 0.9.11 where this issue was resolved, could you check that and confirm the issue is resolved   Regards Boguslaw
            Hide
            ramesh_muthuraj Ramesh Muthuraj added a comment - - edited

            im getting the same error after upgrading plugin 0.9.11. 

            Error
            [Pipeline]

            {[Pipeline] checkoutWiping out workspace first. Cloning the remote Git repository Cloning with configured refspecs honoured and without tags ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "/usr/bin/git fetch --no-tags --progress ssh://git@bitbucket**********.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: /home/ec2-user/workspace/*****/develop@tmp/ssh7643018751958026140.sh: line 6: ssh: command not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 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 org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:629) 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(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) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to TPAAS-DEV at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:955) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146) at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source) 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.$Proxy128.execute(Unknown Source) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75) 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) ... 4 more[Pipeline] }

            [Pipeline] // node[Pipeline] End of PipelineCloning repository ssh://git@bitbucket*********.git
            > /usr/bin/git init /home/ec2-user/workspace/**************/develop # timeout=10
            Fetching upstream changes from ssh://git@bitbucket.********/identity.git
            > /usr/bin/git --version # timeout=10
            Plugin used

            git 3.10.0 truegit 3.10.0 truegit-parameter 0.9.11 truegit-server 1.7 truegitbucket 0.8 trueJenkins 2.121.2

            Show
            ramesh_muthuraj Ramesh Muthuraj added a comment - - edited im getting the same error after upgrading plugin 0.9.11.  Error [Pipeline] {[Pipeline] checkoutWiping out workspace first. Cloning the remote Git repository Cloning with configured refspecs honoured and without tags ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "/usr/bin/git fetch --no-tags --progress ssh://git@bitbucket**********.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: /home/ec2-user/workspace/*****/develop@tmp/ssh7643018751958026140.sh: line 6: ssh: command not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 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 org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:629) 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(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) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to TPAAS-DEV at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:955) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146) at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source) 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.$Proxy128.execute(Unknown Source) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75) 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) ... 4 more[Pipeline] } [Pipeline] // node [Pipeline] End of PipelineCloning repository ssh://git@bitbucket*********.git > /usr/bin/git init /home/ec2-user/workspace/**************/develop # timeout=10 Fetching upstream changes from ssh://git@bitbucket.********/identity.git > /usr/bin/git --version # timeout=10 Plugin used git 3.10.0 truegit 3.10.0 truegit-parameter 0.9.11 truegit-server 1.7 truegitbucket 0.8 trueJenkins 2.121.2
            Hide
            ramesh_muthuraj Ramesh Muthuraj added a comment -

            This is breaking the existing build and we couldn't rollback .since we are using the multibrnach pipeline. 

            Show
            ramesh_muthuraj Ramesh Muthuraj added a comment - This is breaking the existing build and we couldn't rollback .since we are using the multibrnach pipeline. 
            Hide
            securitykernel René Korthaus added a comment -

            I can confirm that the issue is fixed after an update to, i.e. I can not reproduce it with the steps from my comment above and we could change jobs that we adopted to use https URLs back to clone via SSH again and confirm that the jobs work fine now. Jenkins 2.176.1, git-parameter-plugin 0.9.11.

            Show
            securitykernel René Korthaus added a comment - I can confirm that the issue is fixed after an update to, i.e. I can not reproduce it with the steps from my comment above and we could change jobs that we adopted to use https URLs back to clone via SSH again and confirm that the jobs work fine now. Jenkins 2.176.1, git-parameter-plugin 0.9.11.
            Hide
            elenhil ivan derbenev added a comment - - edited

            Not fixed for me

            re-creating job doesn't help

             

            Jenkins 2.235

            git parameter plugin 0.9.12

            git plugin 4.2.2

            git client plugin 3.2.1

             

            > git fetch --tags --progress -- ssh://git@zzz:2222/zzz.git +refs/heads/*:refs/remotes/origin/* # timeout=10
            ERROR: Error fetching remote repo 'origin'
            hudson.plugins.git.GitException: Failed to fetch from sssh://git@zzz:2222/zzz.git
             at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:909)
             at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1131)
             at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1167)
             at hudson.scm.SCM.checkout(SCM.java:505)
             at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
             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:1880)
             at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
             at hudson.model.ResourceController.execute(ResourceController.java:97)
             at hudson.model.Executor.run(Executor.java:428)
            Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress -- ssh://git@zzz:2222/zzz.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
            stdout: 
            stderr: /var/jenkins_home/workspace/devops/dsl-install@tmp/jenkins-gitclient-ssh3143469929684385959.sh-copy: 6: /var/jenkins_home/workspace/devops/dsl-install@tmp/jenkins-gitclient-ssh3143469929684385959.sh-copy: ssh: not found
            Show
            elenhil ivan derbenev added a comment - - edited Not fixed for me re-creating job doesn't help   Jenkins 2.235 git parameter plugin 0.9.12 git plugin 4.2.2 git client plugin 3.2.1   > git fetch --tags --progress -- ssh: //git@zzz:2222/zzz.git +refs/heads/*:refs/remotes/origin/* # timeout=10 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from sssh: //git@zzz:2222/zzz.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:909) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1131) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1167) at hudson.scm.SCM.checkout(SCM.java:505) at hudson.model.AbstractProject.checkout(AbstractProject.java:1206) 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:1880) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress -- ssh: //git@zzz:2222/zzz.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: / var /jenkins_home/workspace/devops/dsl-install@tmp/jenkins-gitclient-ssh3143469929684385959.sh-copy: 6: / var /jenkins_home/workspace/devops/dsl-install@tmp/jenkins-gitclient-ssh3143469929684385959.sh-copy: ssh: not found

              People

              • Assignee:
                klimas7 Boguslaw Klimas
                Reporter:
                14163314 Serg Pr
              • Votes:
                1 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: