GitLab项目域名或IP设置及修改
自己在家里搭了个微型服务器,装了centos+宝塔,用宝塔的软件直接装了gitlab,装好后发现项目连接全是ip,家里又是动态IP,这可麻烦了,每次push得改IP为ddns后的域名,一气之下,决定办它,于是通过一翻修改终于搞定了,项目名称直接显示域名了,如图
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
修改后的样子
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'
gitlab-ctl restart