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

Jenkins Window slave can not fetch from bitbucket

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-plugin
    • Jenkins Slave on a Window Server 2008 R2, Service Pack1. 64-bit.

      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.
       

          [JENKINS-54354] Jenkins Window slave can not fetch from bitbucket

          Xavier Fustero created issue -
          Mark Waite made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Mark Waite made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Xavier Fustero made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Mark Waite made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Mark Waite made changes -
          Resolution Original: Fixed [ 1 ] New: Not A Defect [ 7 ]
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]
          Xavier Fustero made changes -
          Description Original: 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.
           
          New: 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.
            
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: