-
Bug
-
Resolution: Fixed
-
Blocker
-
None
Current git-client-plugin does not work with latest git release 2.16 and non-standard ssh ports
[Pipeline] checkout Cloning the remote Git repository Cloning with configured refspecs honoured and without tags Cloning repository ssh://git@host:7999/project/repo.git > git init /jenkins/workspace/repo_develop-DGGZOGIPSH34PO2EDJ254373MVQP6J2NDVXNIMFMFC6GWPEKUVAQ # timeout=10 Fetching upstream changes from ssh://git@host:7999/project/repo.git > git --version # timeout=10 using GIT_SSH to set credentials ssh-key > git fetch --no-tags --progress ssh://git@host:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git fetch --no-tags --progress ssh://git@host:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop" returned status code 128: stdout: stderr: fatal: ssh variant 'simple' does not support setting port at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1990) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1709) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:400) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:609) 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:210) at hudson.remoting.UserRequest.perform(UserRequest.java:53) at hudson.remoting.Request$2.run(Request.java:358) 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 eap0035 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1696) at hudson.remoting.UserResponse.retrieve(UserRequest.java:313) at hudson.remoting.Channel.call(Channel.java:909) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 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.$Proxy107.execute(Unknown Source) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1120) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160) 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:274) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more
Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
#!/bin/sh // ${SSH_ASKPASS} might be ignored if ${DISPLAY} is not set if [ -z "${DISPLAY}" ]; then DISPLAY=:123.456 export DISPLAY fi ssh -i ~/key -l ${USER} -o StrictHostKeyChecking=no "$@"
Export GIT_SSH variable
export GIT_SSH=~/ssh.sh
Test a git call (with 2.16)
git fetch --no-tags --progress ssh://git@<host>:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop fatal: ssh variant 'simple' does not support setting port