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

Cannot use native git client (host executable) after upgrading to 2.4.4+

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-client-plugin
    • None
    • Jenkins 2.46.3
      Ubuntu 16.04 LTS
      OpenJDK 8
      git-client-plugin 2.4.6

      Hi, after upgrading to 2.4.4+, I get the following when trying to use the git client executable on the jenkins host:

      00:36:53 Started by user 
       anonymous
       00:36:53 Building in workspace <job workspace>
       00:36:53 > git rev-parse --is-inside-work-tree # timeout=10
       00:36:53 Fetching changes from the remote Git repository
       00:36:53 > git config remote.origin.url git@github.com:<org>/<repo>.git # timeout=10
       00:36:53 Cleaning workspace
       00:36:53 > git rev-parse --verify HEAD # timeout=10
       00:36:54 Resetting working tree
       00:36:54 > git reset --hard # timeout=10
       00:36:54 > git clean -fdx # timeout=10
       00:36:54 Fetching upstream changes from git@github.com:<org>/<repo>.git
       00:36:54 > git --version # timeout=10
       00:36:54 using GIT_SSH to set credentials <credentials>
       00:36:54 > git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1
       00:36:54 ERROR: Error fetching remote repo 'origin'
       00:36:54 hudson.plugins.git.GitException: Failed to fetch from git@github.com:<org>/<repo>.git
       00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
       00:36:54 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
       00:36:54 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
       00:36:54 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:143)
       00:36:54 at hudson.scm.SCM.checkout(SCM.java:496)
       00:36:54 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
       00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
       00:36:54 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
       00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
       00:36:54 at hudson.model.Run.execute(Run.java:1728)
       00:36:54 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       00:36:54 at hudson.model.ResourceController.execute(ResourceController.java:98)
       00:36:54 at hudson.model.Executor.run(Executor.java:405)
       00:36:54 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1" returned status code 128:
       00:36:54 stdout: 
       00:36:54 stderr: fatal: cannot exec '<workspace>/<repo>@tmp/ssh4237084916794305202.sh': Permission denied
       00:36:54 fatal: unable to fork
       00:36:54 
       00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
       00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
       00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
       00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
       00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
       00:36:54 ... 12 more
       00:36:54 ERROR: null
       00:36:54 Finished: FAILURE

      This is a fairly barebones setup, and jgit works, but I'd like to use the native client so I can do shallow cloning.

      Thanks!

          [JENKINS-44951] Cannot use native git client (host executable) after upgrading to 2.4.4+

          Gerard Sunga created issue -
          Gerard Sunga made changes -
          Description Original: Hi, after upgrading to 2.4.4+, I get the following when trying to use the git client executable on the jenkins host:
          00:36:53 Started by user
          anonymous
          00:36:53 Building in workspace <jenkins root>/<job>
          00:36:53 > git rev-parse --is-inside-work-tree # timeout=10
          00:36:53 Fetching changes from the remote Git repository
          00:36:53 > git config remote.origin.url git@github.com:<org>/<repo>.git # timeout=10
          00:36:53 Cleaning workspace
          00:36:53 > git rev-parse --verify HEAD # timeout=10
          00:36:54 Resetting working tree
          00:36:54 > git reset --hard # timeout=10
          00:36:54 > git clean -fdx # timeout=10
          00:36:54 Fetching upstream changes from git@github.com:<org>/<repo>.git
          00:36:54 > git --version # timeout=10
          00:36:54 using GIT_SSH to set credentials <credentials>
          00:36:54 > git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/*:refs/remotes/origin/* --depth=1
          00:36:54 ERROR: Error fetching remote repo 'origin'
          00:36:54 hudson.plugins.git.GitException: Failed to fetch from git@github.com:<org>/<repo>.git
          00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
          00:36:54 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
          00:36:54 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
          00:36:54 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:143)
          00:36:54 at hudson.scm.SCM.checkout(SCM.java:496)
          00:36:54 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
          00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          00:36:54 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          00:36:54 at hudson.model.Run.execute(Run.java:1728)
          00:36:54 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          00:36:54 at hudson.model.ResourceController.execute(ResourceController.java:98)
          00:36:54 at hudson.model.Executor.run(Executor.java:405)
          00:36:54 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/*:refs/remotes/origin/* --depth=1" returned status code 128:
          00:36:54 stdout:
          00:36:54 stderr: fatal: cannot exec '<path>/<repo>@tmp/ssh4237084916794305202.sh': Permission denied
          00:36:54 fatal: unable to fork
          00:36:54
          00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
          00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
          00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
          00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
          00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
          00:36:54 ... 12 more
          00:36:54 ERROR: null
          00:36:54 Finished: FAILURE

          This is a fairly barebones setup, and jgit works, but I'd like to use the native client so I can do shallow cloning.

          Thanks!
          New: Hi, after upgrading to 2.4.4+, I get the following when trying to use the git client executable on the jenkins host:
          {noformat}
          00:36:53 Started by user
           anonymous
           00:36:53 Building in workspace <jenkins root>/<job>
           00:36:53 > git rev-parse --is-inside-work-tree # timeout=10
           00:36:53 Fetching changes from the remote Git repository
           00:36:53 > git config remote.origin.url git@github.com:<org>/<repo>.git # timeout=10
           00:36:53 Cleaning workspace
           00:36:53 > git rev-parse --verify HEAD # timeout=10
           00:36:54 Resetting working tree
           00:36:54 > git reset --hard # timeout=10
           00:36:54 > git clean -fdx # timeout=10
           00:36:54 Fetching upstream changes from git@github.com:<org>/<repo>.git
           00:36:54 > git --version # timeout=10
           00:36:54 using GIT_SSH to set credentials <credentials>
           00:36:54 > git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1
           00:36:54 ERROR: Error fetching remote repo 'origin'
           00:36:54 hudson.plugins.git.GitException: Failed to fetch from git@github.com:<org>/<repo>.git
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
           00:36:54 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
           00:36:54 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
           00:36:54 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:143)
           00:36:54 at hudson.scm.SCM.checkout(SCM.java:496)
           00:36:54 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
           00:36:54 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
           00:36:54 at hudson.model.Run.execute(Run.java:1728)
           00:36:54 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           00:36:54 at hudson.model.ResourceController.execute(ResourceController.java:98)
           00:36:54 at hudson.model.Executor.run(Executor.java:405)
           00:36:54 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1" returned status code 128:
           00:36:54 stdout:
           00:36:54 stderr: fatal: cannot exec '<path>/<repo>@tmp/ssh4237084916794305202.sh': Permission denied
           00:36:54 fatal: unable to fork
           00:36:54
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
           00:36:54 ... 12 more
           00:36:54 ERROR: null
           00:36:54 Finished: FAILURE{noformat}
          This is a fairly barebones setup, and jgit works, but I'd like to use the native client so I can do shallow cloning.

          Thanks!
          Gerard Sunga made changes -
          Description Original: Hi, after upgrading to 2.4.4+, I get the following when trying to use the git client executable on the jenkins host:
          {noformat}
          00:36:53 Started by user
           anonymous
           00:36:53 Building in workspace <jenkins root>/<job>
           00:36:53 > git rev-parse --is-inside-work-tree # timeout=10
           00:36:53 Fetching changes from the remote Git repository
           00:36:53 > git config remote.origin.url git@github.com:<org>/<repo>.git # timeout=10
           00:36:53 Cleaning workspace
           00:36:53 > git rev-parse --verify HEAD # timeout=10
           00:36:54 Resetting working tree
           00:36:54 > git reset --hard # timeout=10
           00:36:54 > git clean -fdx # timeout=10
           00:36:54 Fetching upstream changes from git@github.com:<org>/<repo>.git
           00:36:54 > git --version # timeout=10
           00:36:54 using GIT_SSH to set credentials <credentials>
           00:36:54 > git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1
           00:36:54 ERROR: Error fetching remote repo 'origin'
           00:36:54 hudson.plugins.git.GitException: Failed to fetch from git@github.com:<org>/<repo>.git
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
           00:36:54 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
           00:36:54 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
           00:36:54 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:143)
           00:36:54 at hudson.scm.SCM.checkout(SCM.java:496)
           00:36:54 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
           00:36:54 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
           00:36:54 at hudson.model.Run.execute(Run.java:1728)
           00:36:54 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           00:36:54 at hudson.model.ResourceController.execute(ResourceController.java:98)
           00:36:54 at hudson.model.Executor.run(Executor.java:405)
           00:36:54 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1" returned status code 128:
           00:36:54 stdout:
           00:36:54 stderr: fatal: cannot exec '<path>/<repo>@tmp/ssh4237084916794305202.sh': Permission denied
           00:36:54 fatal: unable to fork
           00:36:54
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
           00:36:54 ... 12 more
           00:36:54 ERROR: null
           00:36:54 Finished: FAILURE{noformat}
          This is a fairly barebones setup, and jgit works, but I'd like to use the native client so I can do shallow cloning.

          Thanks!
          New: Hi, after upgrading to 2.4.4+, I get the following when trying to use the git client executable on the jenkins host:
          {noformat}
          00:36:53 Started by user
           anonymous
           00:36:53 Building in workspace <job workspace>
           00:36:53 > git rev-parse --is-inside-work-tree # timeout=10
           00:36:53 Fetching changes from the remote Git repository
           00:36:53 > git config remote.origin.url git@github.com:<org>/<repo>.git # timeout=10
           00:36:53 Cleaning workspace
           00:36:53 > git rev-parse --verify HEAD # timeout=10
           00:36:54 Resetting working tree
           00:36:54 > git reset --hard # timeout=10
           00:36:54 > git clean -fdx # timeout=10
           00:36:54 Fetching upstream changes from git@github.com:<org>/<repo>.git
           00:36:54 > git --version # timeout=10
           00:36:54 using GIT_SSH to set credentials <credentials>
           00:36:54 > git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1
           00:36:54 ERROR: Error fetching remote repo 'origin'
           00:36:54 hudson.plugins.git.GitException: Failed to fetch from git@github.com:<org>/<repo>.git
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
           00:36:54 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
           00:36:54 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
           00:36:54 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:143)
           00:36:54 at hudson.scm.SCM.checkout(SCM.java:496)
           00:36:54 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
           00:36:54 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
           00:36:54 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
           00:36:54 at hudson.model.Run.execute(Run.java:1728)
           00:36:54 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           00:36:54 at hudson.model.ResourceController.execute(ResourceController.java:98)
           00:36:54 at hudson.model.Executor.run(Executor.java:405)
           00:36:54 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<org>/<repo>.git +refs/heads/:refs/remotes/origin/ --depth=1" returned status code 128:
           00:36:54 stdout:
           00:36:54 stderr: fatal: cannot exec '<workspace>/<repo>@tmp/ssh4237084916794305202.sh': Permission denied
           00:36:54 fatal: unable to fork
           00:36:54
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
           00:36:54 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
           00:36:54 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
           00:36:54 ... 12 more
           00:36:54 ERROR: null
           00:36:54 Finished: FAILURE{noformat}
          This is a fairly barebones setup, and jgit works, but I'd like to use the native client so I can do shallow cloning.

          Thanks!
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Gerard Sunga made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Unassigned Unassigned
            gmsunga Gerard Sunga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: