gitlab:修改project下载地址的默认域名和端口
14:44 2019/2/12
Project ssh 协议端口(只是显示的端口,如ssh://git@gitlab_ssh.test.com:2222/test2/helloworld.git,实际还是工作于22端口):
vi /etc/gitlab/gitlab.rb
external_url "http://gitlab_http.test.com"
gitlab_rails['gitlab_ssh_host'] = 'gitlab_ssh.test.com'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
重新生成配置:
gitlab-ctl reconfigure (会生成新的gitlab.yml)
gitlab-ctl restart
或者直接修改gitlab.yml:
Project http协议域名和端口
vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml (gitlab.yml -> /var/opt/gitlab/gitlab-rails/etc/gitlab.yml)
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: gitlab_http.test.com
port: 8080
https: false
time_zone: "Asia/Shanghai"
ssh_host: gitlab_ssh.test.com
ssh_port: 2222
重启服务:
gitlab-ctl restart
立即生效。
更多推荐
所有评论(0)