我安装了全新的 CentOS 6.6,并使用 Omniubus 安装程序来安装 Gitlab 的 CE。
运行gitlab-ctl reconfigure时,出现以下错误:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb
================================================================================
RuntimeError
------------
External URL must include a FQDN
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:95:in `parse_external_url'
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:191:in `generate_config'
/opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:
88:
89: def parse_external_url
90: return unless external_url
91:
92: uri = URI(external_url.to_s)
93:
94: unless uri.host
95>> raise "External URL must include a FQDN"
96: end
97: Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}"
98: Gitlab['gitlab_rails']['gitlab_host'] = uri.host
99: Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}"
100:
101: case uri.scheme
102: when "http"
103: Gitlab['gitlab_rails']['gitlab_https'] = false
104: when "https"
服务器的 FQDN 设置正确,我有一个外部 IP。 DNS 配置为 FQDN 指向我的外部 IP。
这是我的 /etc/gitlab/gitlab.rb 的内容,以防有用:
# Check and change the external_url to the address your users will type in their browser
external_url 'gitlab.thefallenphoenix.net'
gitlab_rails['gitlab_email_from'] = 'gitlab@thefallenphoenix.net'
最佳答案
编辑:现在通过添加 http://
来修复此问题或https://
到 .rb
中的域文件。使用 Gitlab EE 在 Debian 9 上进行了测试。
添加=
登录 gitlab.rb。
应该是:
external_url = 'gitlab.thefallenphoenix.net'
gitlab_rails['gitlab_email_from'] = 'gitlab@thefallenphoenix.net'
之后应该可以正常安装。至少它在 CentOS 6.6 上对我有用。
关于gitlab - 外部 URL 必须包含 FQDN,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26660084/