Change SSH host for cloning

Is there a way to change the default ssh host for gitlab (displayed at the top of the repository window in the web interface)? I mean only SSH in clones.

For example, I have gitlab installed on git.example.com , but example.com also points to the same computer (another site). Can I change ssh urls with:

 git clone git@git.example.com :user/repository 

in

 git clone git@example.com :user/repositiory 

but for http and https leave it with git.example.com ?

+7
gitlab
source share
2 answers

Yes,

If you use the omnibus package, you can edit /etc/gitlab/gitlab.rb and add gitlab_rails['gitlab_ssh_host'] = 'example.host.com'

There is an equivalent option somewhere in gitlab.yml : ssh_host: example.host.com

+12
source share

Yes.

If your subdomain behaves the same as your actual domain, this should not be a problem. If the subdomain points to the same IP address, git or ssh, no worries.

0
source share

All Articles