-
Bug
-
Resolution: Fixed
-
Minor
-
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!
I've not seen that case before. Be sure that you're using the latest release of the git client plugin and the latest release of the git plugin. You may also want to read https://support.cloudbees.com/hc/en-us/articles/115003082887-Jenkins-with-Git-Client-needs-permission-on-Temporary-directory in case you do not have execute permission on the workspace temporary directory.