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

Jenkins Window slave can not fetch from bitbucket

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: git-plugin
    • Environment:
      Jenkins Slave on a Window Server 2008 R2, Service Pack1. 64-bit.
    • Similar Issues:

      Description

      I have a Jenkins Master running on a linux box. Several jobs clone repos from Bitbucket but I have a Windows slave which fails with the following error:

      Building remotely on slavewin-WIN-9G6KGDM45N7-7b265e7f (swarm slavewin) in workspace D:\workspace\SYS-TEST
       > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@XXX.git # timeout=10
      Fetching upstream changes from ssh://git@git.XXX.git
       > C:\Program Files\Git\bin\git.exe --version # timeout=10
      using GIT_SSH to set credentials rsa / deploy keys
       > C:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@XXX.git +refs/heads/*:refs/remotes/origin/*
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from ssh://git@XXX.git
      	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 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:1819)
      	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:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@XXX.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      stdout: 
      stderr: /c: /c: Is a directory
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      

      The job is configured passing the credential.
      On the Windows side I have installed git-bash:

       $ git --version
      git version 2.19.1.windows.1

      and set these environment variables:

      GIT_SSH=C:\Program Files\Git\usr\bin\ssh.exe
      Path=blablabla:C:\Program Files\Git\cmd

      If I add the private key in users home/.ssh and type git commands to clone, fetch,etc on the Windows it works. However, when launching the Jenkins job from Master UI it return above error. 
      From Jenkins Master I have this:

      -bash-4.2$ git --version
      git version 2.18.0
      
      and Jenkins git-client ver 3.9.1

      Curiously it was working few days ago but we are not able to identify what changed on Jenkins that make everything crashing when running this slave.
       

        Attachments

          Activity

          xfustero Xavier Fustero created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
          Resolution Not A Defect [ 7 ]
          markewaite Mark Waite made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          xfustero Xavier Fustero made changes -
          Resolution Not A Defect [ 7 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          markewaite Mark Waite made changes -
          Status Reopened [ 4 ] Open [ 1 ]
          markewaite Mark Waite made changes -
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
          Resolution Fixed [ 1 ]
          markewaite Mark Waite made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ] Not A Defect [ 7 ]
          xfustero Xavier Fustero made changes -
          Description I have a Jenkins Master running on a linux box. Several jobs clone repos from Bitbucket but I have a Windows slave which fails with the following error:
          {noformat}
          Building remotely on slavewin-WIN-9G6KGDM45N7-7b265e7f (swarm slavewin) in workspace D:\workspace\SYS-TEST
           > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@git.clarivate.io/ls-editorial/ls-jpharm-gui-qa-tests-acceptance.git # timeout=10
          Fetching upstream changes from ssh://git@git.clarivate.io/ls-editorial/ls-jpharm-gui-qa-tests-acceptance.git
           > C:\Program Files\Git\bin\git.exe --version # timeout=10
          using GIT_SSH to set credentials rsa / deploy keys
           > C:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@git.clarivate.io/ls-editorial/ls-jpharm-gui-qa-tests-acceptance.git +refs/heads/*:refs/remotes/origin/*
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@git.clarivate.io/ls-editorial/ls-jpharm-gui-qa-tests-acceptance.git
          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 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:1819)
          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:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@git.clarivate.io/ls-editorial/ls-jpharm-gui-qa-tests-acceptance.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: /c: /c: Is a directory
          fatal: Could not read from remote repository.

          Please make sure you have the correct access rights
          and the repository exists.
          {noformat}

          The job is configured passing the credential.
          On the Windows side I have installed git-bash:
          {noformat}
           $ git --version
          git version 2.19.1.windows.1{noformat}
          and set these environment variables:
          {noformat}
          GIT_SSH=C:\Program Files\Git\usr\bin\ssh.exe
          Path=blablabla:C:\Program Files\Git\cmd{noformat}
          If I add the private key in users home/.ssh and type git commands to clone, fetch,etc on the Windows it works. However, when launching the Jenkins job from Master UI it return above error. 
          From Jenkins Master I have this:
          {noformat}
          -bash-4.2$ git --version
          git version 2.18.0

          and Jenkins git-client ver 3.9.1{noformat}

          Curiously it was working few days ago but we are not able to identify what changed on Jenkins that make everything crashing when running this slave.
           
          I have a Jenkins Master running on a linux box. Several jobs clone repos from Bitbucket but I have a Windows slave which fails with the following error:
          {noformat}
          Building remotely on slavewin-WIN-9G6KGDM45N7-7b265e7f (swarm slavewin) in workspace D:\workspace\SYS-TEST
           > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@XXX.git # timeout=10
          Fetching upstream changes from ssh://git@git.XXX.git
           > C:\Program Files\Git\bin\git.exe --version # timeout=10
          using GIT_SSH to set credentials rsa / deploy keys
           > C:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@XXX.git +refs/heads/*:refs/remotes/origin/*
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@XXX.git
          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 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:1819)
          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:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@XXX.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: /c: /c: Is a directory
          fatal: Could not read from remote repository.

          Please make sure you have the correct access rights
          and the repository exists.
          {noformat}
          The job is configured passing the credential.
           On the Windows side I have installed git-bash:
          {noformat}
           $ git --version
          git version 2.19.1.windows.1{noformat}
          and set these environment variables:
          {noformat}
          GIT_SSH=C:\Program Files\Git\usr\bin\ssh.exe
          Path=blablabla:C:\Program Files\Git\cmd{noformat}
          If I add the private key in users home/.ssh and type git commands to clone, fetch,etc on the Windows it works. However, when launching the Jenkins job from Master UI it return above error. 
           From Jenkins Master I have this:
          {noformat}
          -bash-4.2$ git --version
          git version 2.18.0

          and Jenkins git-client ver 3.9.1{noformat}
          Curiously it was working few days ago but we are not able to identify what changed on Jenkins that make everything crashing when running this slave.
            

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              xfustero Xavier Fustero
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: