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

plugin doesn't work with ssh link to git repo

    XMLWordPrintable

Details

    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

            14163314 Serg Pr created issue -
            14163314 Serg Pr made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-47399 [ JENKINS-47399 ]
            14163314 Serg Pr made changes -
            Attachment parameter-plugin-bug.txt [ 42135 ]
            klimas7 Boguslaw Klimas made changes -
            Labels ssh_error
            klimas7 Boguslaw Klimas made changes -
            Link This issue duplicates JENKINS-45480 [ JENKINS-45480 ]

            Hi,

            I can't reproduce this issue, but I found code smells, which can provide to unexpected behavior. commit: f85678c3 I changed  it in release 0.9.10.

            Additional I changed error handling, please look on wiki page

            If this issue steal occurred in your environment after update the plugin. Please add more information which I can use to reproduce this issue and reopen this issue. 

            klimas7 Boguslaw Klimas added a comment - Hi, I can't reproduce this issue, but I found code smells, which can provide to unexpected behavior. commit:  f85678c3  I changed  it in release 0.9.10. Additional I changed error handling, please look on  wiki page If this issue steal occurred in your environment after update the plugin. Please add more information which I can use to reproduce this issue and reopen this issue. 

            Release 0.9.10

            klimas7 Boguslaw Klimas added a comment - Release 0.9.10
            klimas7 Boguslaw Klimas made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jelion John Elion added a comment -

            I understand that a fix has been made, but I am seeing the exact behavior described here right down to the stack trace (with different line numbers) in Jenkins 2.164.2 running on Centos 7 Linux with Git Parameter 0.9.10, Git plugin 3.10.0 and Git Client Plugin 2.7.7.

            The referenced Wiki page describes a similar error and states that the SSH command is not available.  However, in my installation I have confirmed that it is available from an interactive terminal session both on the Jenkins master and the Jenkins slave, from the Jenkins Groovy Console a groovy script that executes an arbitrary command prints the ssh help when "ssh" is the arbitrary command, and when "SSH" is entered as the only command in a "Execute windows batch script" build step in a Freestyle test job running on our Windows Jenkins slave.  (It's not clear to me whether this command is being attempted on the master, or on the slave where the job's workspace has already been created.)

            I mean no disrespect by re-opening this bug, but I believe it is still occurring.  Could I ask that this be given a second look?  If there is any output or missing information I can provide I will be happy to try to find it.

             

            [ Resurgence/jke_vulcan_playground ]  Unexpected error!
            hudson.plugins.git.GitException: Command "git ls-remote -h ssh://vdn-bitbucket.pa10lab.gd-ms.us:7999/resurg/vulcan.git" returned status code 128:
            stdout: 
            stderr: /tmp/ssh2051896551955727069.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:2042)
             at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
             at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1666)
             at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1657)
             at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteReferences(CliGitAPIImpl.java:2877)
            

             

             

             

            jelion John Elion added a comment - I understand that a fix has been made, but I am seeing the exact behavior described here right down to the stack trace (with different line numbers) in Jenkins 2.164.2 running on Centos 7 Linux with Git Parameter 0.9.10, Git plugin 3.10.0 and Git Client Plugin 2.7.7. The referenced Wiki page describes a similar error and states that the SSH command is not available.  However, in my installation I have confirmed that it is available from an interactive terminal session both on the Jenkins master and the Jenkins slave, from the Jenkins Groovy Console a groovy script that executes an arbitrary command prints the ssh help when "ssh" is the arbitrary command, and when "SSH" is entered as the only command in a "Execute windows batch script" build step in a Freestyle test job running on our Windows Jenkins slave.  (It's not clear to me whether this command is being attempted on the master, or on the slave where the job's workspace has already been created.) I mean no disrespect by re-opening this bug, but I believe it is still occurring.  Could I ask that this be given a second look?  If there is any output or missing information I can provide I will be happy to try to find it.   [ Resurgence/jke_vulcan_playground ]  Unexpected error! hudson.plugins.git.GitException: Command "git ls-remote -h ssh: //vdn-bitbucket.pa10lab.gd-ms.us:7999/resurg/vulcan.git" returned status code 128: stdout: stderr: /tmp/ssh2051896551955727069.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:2042)  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1666)  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1657)  at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteReferences(CliGitAPIImpl.java:2877)      
            jelion John Elion made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            securitykernel René Korthaus made changes -
            Link This issue is caused by JENKINS-56558 [ JENKINS-56558 ]
            securitykernel René Korthaus added a comment - - edited

            We can reproduce this issue with the latest 0.9.10, too. For us it only happens when the Jenkins master is a Linux node whereas the slave is a Windows node. Here are the steps:

             

            • Create a new freestyle job:
              • Check "This project is parameterized"
              • Add Parameter "Git Parameter"
                • Name: BRANCH_SPECIFIER
                • Parameter Type: Branch or Tag
                • Default Value: origin/master
              • Check "Restrict where this project can be run"
                • Label expression: <any expression that matches a node running the slave agent on Windows>
              • Under Source Code Management, add a Git repo to check out
                • Repository URL: <any URL to check out, using the ssh protocol (git@URL:group/project.git)>
                • Credentials: <whichever you need>
                • Branch Specifier ${BRANCH_SPECIFIER}
            • Build the freestyle job using "Build with parameters"
              • Actual Result: Branches are listed fine, clicking "Build" checks out the branch and makes the job run successful
            • Build the freestyle job a second time using "Build with parameters"
              • Expected Result: Branches are listed, clicking "Build" checks out the branch and finishes the job successfully
              • Actual Result: The default branch "origin/master" and an error message are shown

             

            The default value has been returned
            An error occurred while download data
            Command "git ls-remote -h git@URL:group/project.git" returned status code 128:
            stdout: 
            stderr: /tmp/ssh7012935625751221498.sh: 6: /tmp/ssh7012935625751221498.sh: ssh: not found fatal: Could not read from remote repository.
            Please make sure you have the correct access rights and the repository exists.
            Please look at the Log
            Please check the configuration
            

            The problem is also reported in JENKINS-56558. It even points to the problematic code that causes it.

             

            securitykernel René Korthaus added a comment - - edited We can reproduce this issue with the latest 0.9.10, too. For us it only happens when the Jenkins master is a Linux node whereas the slave is a Windows node. Here are the steps:   Create a new freestyle job: Check "This project is parameterized" Add Parameter "Git Parameter" Name: BRANCH_SPECIFIER Parameter Type: Branch or Tag Default Value: origin/master Check "Restrict where this project can be run" Label expression: <any expression that matches a node running the slave agent on Windows> Under Source Code Management, add a Git repo to check out Repository URL: <any URL to check out, using the ssh protocol (git@URL:group/project.git)> Credentials: <whichever you need> Branch Specifier ${BRANCH_SPECIFIER} Build the freestyle job using "Build with parameters" Actual Result: Branches are listed fine, clicking "Build" checks out the branch and makes the job run successful Build the freestyle job a second time using "Build with parameters" Expected Result: Branches are listed, clicking "Build" checks out the branch and finishes the job successfully Actual Result: The default branch "origin/master" and an error message are shown   The default value has been returned An error occurred while download data Command "git ls-remote -h git@URL:group/project.git" returned status code 128: stdout:  stderr: /tmp/ssh7012935625751221498.sh: 6: /tmp/ssh7012935625751221498.sh: ssh: not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Please look at the Log Please check the configuration The problem is also reported in JENKINS-56558 . It even points to the problematic code that causes it.  
            prawen Praveen Kumar added a comment -

            Hello,

            I'm facing the same issue with Linux Jenkins Master and Windows Slave. Is there a workaround for this issue ?

            prawen Praveen Kumar added a comment - Hello, I'm facing the same issue with Linux Jenkins Master and Windows Slave. Is there a workaround for this issue ?

            Workaround is to clone using https.

            securitykernel René Korthaus added a comment - Workaround is to clone using https.
            mpflugfelder Mike Pflugfelder added a comment - - edited

            I'm having the same problem, and it appears at this time that the workaround of using https to clone the repo does in fact work.

             

            Jenkins: 2.179

            Git client plugin: 2.7.7

            Git Parameter Plug-In: 0.9.10

            Git plugin: 3.10.0

             

            Jenkins master is Linux, Build slave is Windows 10 Pro

            mpflugfelder Mike Pflugfelder added a comment - - edited I'm having the same problem, and it appears at this time that the workaround of using https to clone the repo does in fact work.   Jenkins: 2.179 Git client plugin: 2.7.7 Git Parameter Plug-In: 0.9.10 Git plugin: 3.10.0   Jenkins master is Linux, Build slave is Windows 10 Pro
            wild_gitler Wild Gitler made changes -
            Comment [ Is there any other workaround other than https? 
             * The default value has been returned
             * An error occurred while download data
             * Command "git ls-remote -h ssh://git@*********************" returned status code 128:
            stdout: 
            stderr: /tmp/**********************: 6: /tmp/*****************************.sh: ssh: not found
            fatal: Could not read from remote repository.

            Please make sure you have the correct access rights
            and the repository exists.
             * Please look at the Log
             * Please check the configuration ]
            jelion John Elion added a comment - - edited

            Discovered by accident:  If I create a copy of a job that has this bug, the copy does not seem to!  (Click "New Item" in a folder, give the new item a name and choose "Copy" down at the bottom, and enter the name of the job that is breaking like this.)  Save, run the job once (the first time it has been working for everybody), run it again - and the second time seems to be working.  Even after doing this, the original job still has the error described by this bug.

            I looked at the two config.xml files - they seem identical except for a GUID.  So I'm not sure why this happens, but it might provide a sort of workaround to those who are frustrated by this behavior.

            My jobs are all FreeStyle jobs.  I have seen this on multiple jobs (I had to essentially rename a bunch of jobs because their common suffix was part of an exclusion pattern in a test config.).  I am confident that, because it is still happening on the original jobs, it is not related to any sort of plugin upgrades (I have upgraded plugins, though the Git plugins I noted above are still at those same versions.)

             

            jelion John Elion added a comment - - edited Discovered by accident:  If I create a copy of a job that has this bug, the copy does not seem to!  (Click "New Item" in a folder, give the new item a name and choose "Copy" down at the bottom, and enter the name of the job that is breaking like this.)  Save, run the job once (the first time it has been working for everybody), run it again - and the second time seems to be working.  Even after doing this, the original job still has the error described by this bug. I looked at the two config.xml files - they seem identical except for a GUID.  So I'm not sure why this happens, but it might provide a sort of workaround to those who are frustrated by this behavior. My jobs are all FreeStyle jobs.  I have seen this on multiple jobs (I had to essentially rename a bunch of jobs because their common suffix was part of an exclusion pattern in a test config.).  I am confident that, because it is still happening on the original jobs, it is not related to any sort of plugin upgrades (I have upgraded plugins, though the Git plugins I noted above are still at those same versions.)  
            bgrogan Brian Grogan added a comment -

            I have the same issue with one of the jobs on my Jenkins installation. 

            Error Output from the Console Log

            > git fetch --tags --progress git@git-server:organization/project.git +refs/heads/:refs/remotes/origin/

            ERROR: Error cloning remote repo 'origin'

            hudson.plugins.git.GitException: Command "git fetch --tags --progress git@git-server:organization/project.git +refs/heads/:refs/remotes/origin/" returned status code 128:

            stdout:

            stderr: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: 6: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: ssh: not found

            fatal: Could not read from remote repository. 

            Please make sure you have the correct access rights

            and the repository exists.

             

            Much like John Elion above, when I make a clone of the affected job, the cloned job has the same issue as the original job. If I create an entirely new job, and fill in the configuration values manually, the new job works fine. Somehow, the cloned job is "inheriting" the buggy behavior from its parent. 

            My jobs are the FreeStyle type, and they use the Build Parameters configuration option. On my Jenkins installation, I use the Git plug-in, the Git Client plug-in, and the GitLab plug-in. The Jenkins master and all of the Jenkins slaves run Ubuntu Linux. 

            So far, the only solution to this issue I can find is to manually re-create the affected job (no cloning). 

            Software Versions

            Jenkins: 2.178 

            Jenkins Master: Ubuntu 16.04.5 

            Jenkins Slaves: Ubuntu 16.04.5 

            Git Plug-in: 3.9.3 

            Git Client Plug-in: 2.7.7 

            GitLab Plug-in: 1.5.12 

             

            bgrogan Brian Grogan added a comment - I have the same issue with one of the jobs on my Jenkins installation.  Error Output from the Console Log > git fetch --tags --progress git@git-server:organization/project.git +refs/heads/ :refs/remotes/origin/ ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git fetch --tags --progress git@git-server:organization/project.git +refs/heads/ :refs/remotes/origin/ " returned status code 128: stdout: stderr: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: 6: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: ssh: not found fatal: Could not read from remote repository.   Please make sure you have the correct access rights and the repository exists.   Much like John Elion  above, when I make a clone of the affected job, the cloned job has the same issue as the original job. If I create an entirely new job, and fill in the configuration values manually, the new job works fine. Somehow, the cloned job is "inheriting" the buggy behavior from its parent.  My jobs are the FreeStyle type, and they use the Build Parameters configuration option. On my Jenkins installation, I use the Git plug-in, the Git Client plug-in, and the GitLab plug-in. The Jenkins master and all of the Jenkins slaves run Ubuntu Linux.  So far, the only solution to this issue I can find is to manually re-create the affected job (no cloning).  Software Versions Jenkins : 2.178  Jenkins Master : Ubuntu 16.04.5  Jenkins Slaves : Ubuntu 16.04.5  Git Plug-in : 3.9.3  Git Client Plug-in : 2.7.7  GitLab Plug-in : 1.5.12   
            serhii_volz Serhii VoLz added a comment - - edited

            bgrogan still have this error:

            > git fetch --tags --progress git@git-server:organization/project.git +refs/heads/:refs/remotes/origin/

            ERROR: Error cloning remote repo 'origin'

            hudson.plugins.git.GitException: Command "git fetch --tags --progress git@git-server:organization/project.git +refs/heads/:refs/remotes/origin/" returned status code 128:

            stdout:

            stderr: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: 6: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: ssh: not found

            fatal: Could not read from remote repository. 

            Please make sure you have the correct access rights

            and the repository exists.

            I have same problem too... 

            serhii_volz Serhii VoLz added a comment - - edited bgrogan  still have this error: > git fetch --tags --progress git@git-server:organization/project.git +refs/heads/ :refs/remotes/origin/ ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git fetch --tags --progress git@git-server:organization/project.git +refs/heads/ :refs/remotes/origin/ " returned status code 128: stdout: stderr: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: 6: /home/jenkins/workspace/project-name@tmp/ssh8085679836267327653.sh: ssh: not found fatal: Could not read from remote repository.   Please make sure you have the correct access rights and the repository exists. I have same problem too... 
            klimas7 Boguslaw Klimas made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            klimas7 Boguslaw Klimas made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            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

            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
            klimas7 Boguslaw Klimas made changes -
            Link This issue relates to JENKINS-56558 [ JENKINS-56558 ]
            klimas7 Boguslaw Klimas made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            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

            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

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

            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. 

            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.

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

              klimas7 Boguslaw Klimas
              14163314 Serg Pr
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: