美文网首页
contos 7 gitlab 安装

contos 7 gitlab 安装

作者: 待汝豪杰只是凡夫 | 来源:发表于2017-08-01 15:08 被阅读0次

    命令网站
    http://www.shcsinfo.com/china/gitdownload.html#centos7
    ===========================
    可能遇到的问题 (不定期更新)
    gitlab-ctl reconfigure 报错解决方法
    <code>
    [root@websvr01 ~]# sudo gitlab-ctl reconfigure
    Starting Chef Client, version 11.12.2
    Compiling Cookbooks...
    Recipe: gitlab::default

    • directory[/etc/gitlab] action create (up to date)
      ================================================================================
      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:109:in parse_external_url' /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:260:ingenerate_config'
    /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file'
    Relevant File Content:


    /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:
    102:
    103: def parse_external_url
    104: return unless external_url
    105:
    106: uri = URI(external_url.to_s)
    107:
    108: unless uri.host
    109>> raise "External URL must include a FQDN"
    110: end
    111: Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}"
    112: Gitlab['gitlab_rails']['gitlab_host'] = uri.host
    113: Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}"
    114:
    115: case uri.scheme
    116: when "http"
    117: Gitlab['gitlab_rails']['gitlab_https'] = false
    118: when "https"
    Running handlers:
    [2014-11-25T11:10:44+08:00] ERROR: Running exception handlers
    Running handlers complete
    [2014-11-25T11:10:44+08:00] ERROR: Exception handlers complete
    [2014-11-25T11:10:44+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
    Chef Client failed. 0 resources updated in 7.716937465 seconds
    [2014-11-25T11:10:44+08:00] ERROR: External URL must include a FQDN
    [2014-11-25T11:10:45+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
    </code>
    解决方法:
    是因为/etc/gitlab/gitlab.rb文件中的内容是:
    external_url 'hostname'
    将其修改为:
    external_url='hostname'

    即可,只需要在原来的配置项中添加个 ‘=’ 即可,为了避免域名引起的问题,也可以直接配置ip,如下所示:
    external_url='172.16.163.138'

    相关文章

      网友评论

          本文标题:contos 7 gitlab 安装

          本文链接:https://www.haomeiwen.com/subject/yipjlxtx.html