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 git@git.example.com:user/repository

to:

git clone git@example.com:user/repositiory

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

有帮助吗?

解决方案

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top