Skip to content

Remote mirror does not allow setting SSH port by default

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Zendesk: https://gitlab.zendesk.com/agent/tickets/109778

A customer configured a pull mirror with a repository URL in the format ssh://user@git.example.com:1234/foo/bar.git. This is a common URL format when a user needs to specify a non-standard SSH port.

In this case GitLab returns an error when attempting to pull from the mirror: fatal: ssh variant 'simple' does not support setting port

This is strange because the default in Git doesn't seem to be simple. On my own Git client I can specify this URL format without such an error. In GitLab, the customer was able to specify the ssh variant using the following configuration in gitlab.rb:

omnibus_gitconfig['system'] = { 'ssh' => ['variant = ssh'] }
  • Why is this necessary when GitLab acts as the client?
  • If this is expected behavior we should add troubleshooting documentation about this.
Edited by 🤖 GitLab Bot 🤖