GwynBleidD
GwynBleidD

Reputation: 20539

Change SSH host for cloning

Is there any way to change default ssh host for gitlab (displayed at top of repository view in web interface)? I mean only for SSH in clone urls.

For example I have my gitlab installation on git.example.com, but example.com also points to the same machine (different site). Can I change ssh clone urls from:

git clone [email protected]:user/repository

to:

git clone [email protected]:user/repositiory

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

Upvotes: 11

Views: 5438

Answers (2)

Alda Marteau-Hardi
Alda Marteau-Hardi

Reputation: 176

Yes,

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

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

Upvotes: 16

Jonathan M. Hethey
Jonathan M. Hethey

Reputation: 714

Yes.

If your subdomain behaves the same way your actual domain does, it should not be a problem. If the subdomain points to the same IP, git or ssh for that matter should not bother.

Upvotes: 0

Related Questions