gitlab - 外部 URL 必须包含 FQDN

标签 gitlab

我安装了全新的 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/

相关文章:

GitLab:如何更改 merge 提交消息模板?

gitlab - 如何在 gitlab-ci 运行期间修复 "No such file or directory"

git - 如何将文件夹从一个 git repo 链接到另一个 repo?

Gitlab管道+docker : (7) Failed to connect to localhost port 9000: Connection refuse

sed - 如何使用 sed 将 yml 文件中的变量替换为 gitlab ci 管道变量

docker - gitlab-runner docker-machine 错误

Gitlab管道规则: how to not run a job when a branch has an open merge request?防止重复管道

docker - 自定义Docker桥接网络

git - 如何在 Gitlab 服务器中记录所有用户的 git 命令( pull/克隆/推...)?

python - 使用 Gitlab API 添加 SSH key 时出现 Http 404 错误