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

fatal: ssh variant 'simple' does not support setting port

    Details

    • Similar Issues:

      Description

      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
      

        Attachments

          Activity

          mjoe Joerg Mattiello created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Assignee Mark Waite [ markewaite ]
          markewaite Mark Waite made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Defect [ 7 ]
          mjoe Joerg Mattiello made changes -
          Component/s git-client-plugin [ 17423 ]
          Component/s git-plugin [ 15543 ]
          mjoe Joerg Mattiello made changes -
          Description current git-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           
          current git-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          test a git call
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop{code}
          mjoe Joerg Mattiello made changes -
          Description current git-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          test a git call
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop{code}
          Current git-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          Export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          Test a git call
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop
          fatal: ssh variant 'simple' does not support setting port
          {code}
          mjoe Joerg Mattiello made changes -
          Description Current git-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          Export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          Test a git call
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop
          fatal: ssh variant 'simple' does not support setting port
          {code}
          Current git-client-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          Export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          Test a git call (with 2.16)
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop
          fatal: ssh variant 'simple' does not support setting port
          {code}
          mjoe Joerg Mattiello made changes -
          Resolution Not A Defect [ 7 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          mjoe Joerg Mattiello made changes -
          Description Current git-client-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          ..
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from ssh://git@host:7999/project/repo.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
          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:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          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)
          Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@host:7999/project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
          stdout:
          stderr: fatal: ssh variant 'simple' does not support setting port
          ..{code}
           Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          Export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          Test a git call (with 2.16)
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop
          fatal: ssh variant 'simple' does not support setting port
          {code}
          Current git-client-plugin does not work with latest git release 2.16 and non-standard ssh ports
          {code:java}
          [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{code}
           Steps to reproduce, create a ssh.sh wrapper file (like it will be done during createUnixGitSSH)
          {code:java}
          #!/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 "$@"
          {code}
          Export GIT_SSH variable
          {code:java}
          export GIT_SSH=~/ssh.sh
          {code}
          Test a git call (with 2.16)
          {code:java}
          git fetch --no-tags --progress ssh://git@&lt;host&gt;:7999/project/repo.git +refs/heads/develop:refs/remotes/origin/develop
          fatal: ssh variant 'simple' does not support setting port
          {code}
          mjoe Joerg Mattiello made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              mjoe Joerg Mattiello
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: