Omnibus Gitlab安装container registry报错

按照http://docs.gitlab.com/ce/administration/container_registry.html#container-registry-domain-configuration

官方文档配置gitlab.rb,结果报错:

Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

NoMethodError
-------------
undefined method `[]=' for nil:NilClass

Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:35:in `from_file'

Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:

28: group "root"
29: mode "0775"
30: action :nothing
31: end.run_action(:create)
32:
33: Gitlab[:node] = node
34: if File.exists?("/etc/gitlab/gitlab.rb")
35>> Gitlab.from_file("/etc/gitlab/gitlab.rb")
36: end
37: node.consume_attributes(Gitlab.generate_config(node['fqdn']))
38:
39: if File.exists?("/var/opt/gitlab/bootstrapped")
40: node.set['gitlab']['bootstrap']['enable'] = false
41: end
42:
43: directory "/var/opt/gitlab" do
44: owner "root"


Running handlers:
[2016-08-08T13:25:18+08:00] ERROR: Running exception handlers
Running handlers complete
[2016-08-08T13:25:18+08:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-08-08T13:25:18+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
[2016-08-08T13:25:18+08:00] ERROR: undefined method `[]=' for nil:NilClass
[2016-08-08T13:25:19+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

 

原因:

gitlab版本太低!!不支持container registry。

gitlab-ce从8.8开始支持container registry:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040

 

查看gitlab版本:

https://gityu.com/help

 

升级gitlab-ce:

sudo yum install gitlab-ce

https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update/README.md#updating-using-the-official-repositories

 

使用yum info gitlab-ce查看版本,如果依然低于最新版本;

更新cache:

yum makecache fast

参照https://packages.gitlab.com/gitlab/gitlab-ce/install 使用rpm下面的

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

更新repository

此时yum info gitlab-ce查看到版本已更新:

 

最后

sudo yum install gitlab-ce

安装最新版本。

 

转载于:https://www.cnblogs.com/flasheryu/p/5748951.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值