lec*_*cmo 3 nginx gitlab gitlab-omnibus
问题:
当我在 GitLab 中创建存储库时,由于某种原因,它显示存储库的不同 HTTP URL 和 SSH URL。
例如)
HTTP:http://anotherexample.com/myrepo.git
SSH:git@gitlab.example.com/myrepo.git
我的 gitlab URL 是:https://gitlab.example.com,所以 SSH 是正确的,HTTP 是错误的。
(anotherexample.com是我设置 DNS 之前我的服务器的 URL。)
我查看了 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml,然后发现:
# 1. GitLab app settings
# ==========================
host: anotherexample.com
port: 80
https: false
ssh_host: gitlab.example.com
Run Code Online (Sandbox Code Playgroud)
然后我手动换了这个主机,暂时解决了。
但是,当我执行gitlab-ctl reconfigure时,gitlab.yml将被更新。
问题:
如何在/etc/gitlab/gitlab.rb 中
为 HTTP 设置此主机名?
我已经有以下两行:
external_url 'https://gitlab.example.com'
gitlab_rails['gitlab_ssh_host'] = 'gitlab.example.com'
Run Code Online (Sandbox Code Playgroud)
但它似乎不适用于 HTTP url。
我的 GitLab 版本:8.8.3
我的服务器:CentOS 6.8 + nginx 1.10.1
提前致谢。
解决了。
我刚刚在/etc/gitlab/gitlab.rb中添加了以下行
gitlab_rails['gitlab_host'] = 'gitlab.example.com'
Run Code Online (Sandbox Code Playgroud)
对于像我这样 URL 完全错误的人,您只需要更新
external_url "http://gitlab.example.com"
Run Code Online (Sandbox Code Playgroud)
在/etc/gitlab/gitlab.rb然后运行
sudo gitlab-ctl reconfigure
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5120 次 |
| 最近记录: |