Custom SSH URL

Hi Guys

I have a question that I hope isn’t too complicated (:crossed_fingers::expressionless::crossed_fingers:), but I have a feeling it might be.

We run an internal facing Gitlab server behind two load balancers. Those load balancers pass through HTTP/HTTPS just fine, but they can’t pass through SSH for reasons I won’t bore you with, and they can’t be changed unfortuantely.

As a result, I have a separate DNS entry for my gitlab server that points directly around the load balancers, solving the ssh issue.

For example:

  • a user would access the GitLab web UI via https://gitlab.ourdomain.local, but
  • the same user pushes/pulls via SSH using git@gitlab-GO.ourdomain.local

This works fine, but it adds a small admin overhead for users who need to consider the URL change when they do an SSH push/pull.

The question is whether it’s possible to customise the SSH URL provided as part of the clone dialog without changing/affecting the clone URL or the main URL for GitLab itself.

Or to put it visually…


Thanks in advance for any advice!


1 Like


Have I posted this to the wrong topic? If so, would an admin kindly delete/re-assign it somewhere more appropriate please? System Administration perhaps?

Thanks! :smiley:

Fixed it…if anyone else needs to make the same change;

Edit /etc/gitlab/gitlab.rb

Search for gitlab_rails[‘gitlab_ssh_host’] = ‘’

Update the hostname value and run a ‘gitlab-ctl reconfigure’ afterwards.