Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 709
Nick Hsu Avatar asked Jan 24 '18 08:01

Nick Hsu


2 Answers

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.
like image 200
MrTux Avatar answered Nov 18 '22 20:11

MrTux


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.

like image 27
MozenRath Avatar answered Nov 18 '22 22:11

MozenRath