转 GitLab项目域名或IP设置及修改

1、 编辑gitlab.yml配置文件

vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

找到host,并修改为你要配置的域名或IP

 ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: 192.168.0.201
    port: 80
    https: false

2、 编辑gitlab.rb文件

vim /etc/gitlab/gitlab.rb

找到external_url,修改成对应的域名或IP

## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#configuring-the-external-url-for-gitlab
external_url 'http://192.168.0.201'

3、 重启GitLab服务

gitlab-ctl restart



原文地址:https://www.cnblogs.com/python-xiakaibi/p/12574613.html