38

When I clone a remote GitLab project, I get the following error:

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

I tried to re-install TortoiseGit, but this did not solve the issue.

Quanlong
  • 19,782
  • 10
  • 62
  • 75
Nick Hsu
  • 405
  • 2
  • 5
  • 8

3 Answers3

62

The internal behavior of Git (>=2.16.0) for SSH tool detection changed and TortoiseGitPlink is not detected any more as ssh or plink compatible.

This only affects if the SSH URL contains a port or you have configured Git to use the Protocol version 2. For now, you need to set the environment variable GIT_SSH_VARIANT to ssh or configure it in Git settings using git config --global ssh.variant ssh.

In the next version of TortoiseGit 2.5.7 this will be done automatically when TortoiseGitPLink is invoked by TortoiseGit (cf. https://tortoisegit.org/issue/3139). If you use TortoiseGitPLink from CLI the setting is still needed).

Update (TLDR):

  • Update TortoiseGit to the latest stable version: https://tortoisegit.org/download/
  • I f you use TortoiseGitPLink from Git CLI also issue git config --global ssh.variant ssh on CLI or set the environment variable GIT_SSH_VARIANT to ssh.
MrTux
  • 28,370
  • 24
  • 91
  • 123
25

if you are using Windows version of git, try this:

git config --global ssh.variant ssh

This is a better option for those who don't want to clutter the environment variables a lot.

MozenRath
  • 8,475
  • 12
  • 54
  • 92
12

Set environment variable GIT_SSH_VARIANT to ssh. This will solve the problem.

export GIT_SSH_VARIANT=ssh
user157251
  • 64,489
  • 38
  • 208
  • 350
Ashish
  • 316
  • 3
  • 5