Gitlab with non-standard SSH port (on VM with Iptable forwarding)

In Omnibus-packaged versions you can modify that property in the /etc/gitlab/gitlab.rb file:

gitlab_rails['gitlab_shell_ssh_port'] = 766

Then, you’ll need to reconfigure GitLab:

# gitlab-ctl reconfigure

Your URIs will then be correctly displayed as ssh://git@git.domain.com:766/group/project.git in the web interface.

Leave a Comment