ruby - 无法在 Windows 7 上安装 librarian-chef Recipe

标签 ruby chef-infra cookbook librarian

我正在尝试在 Windows 提示符下安装 librarian-chef cookbooks。我已经使用 gem install librarian-chef 安装了 librarian-chef。但是我收到此错误:

C:\Users\crmpicco\Documents\vagrant-chef-deploy>librarian-chef install
DL is deprecated, please use Fiddle
Installing iptables (0.14.0)
C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:in `connect': SSL_connect returned
=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Ope
nSSL::SSL::SSLError)
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'

        from C:/Ruby200-x64/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:in `connect'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
        from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:851:in `start'

这是我配置的问题吗?

我的 Cheffile:

#!/usr/bin/env ruby
#^syntax detection

site 'https://supermarket.getchef.com/api/v1'

# cookbook 'chef-client'

# cookbook 'apache2', '>= 1.0.0'

# cookbook 'rvm',
#   :git => 'https://github.com/fnichol/chef-rvm'

# cookbook 'postgresql',
#   :git => 'https://github.com/findsyou/cookbooks',
#   :ref => 'postgresql-improvements'


# Community cookbooks
#cookbook "apache2"
cookbook 'apache2', '~> 2.0.0'
cookbook "php"
#cookbook "yum"
#cookbook "ant"
cookbook "apt"
cookbook 'mysql', '~> 5.5.2'
cookbook "database"
cookbook "ssh_known_hosts"
cookbook "composer"
cookbook 'git', '~> 4.0.2'
cookbook 'varnish', '~> 0.9.18'
cookbook 'selinux', '~> 0.8.0'
cookbook 'hostsfile',
  :git => 'https://github.com/customink-webops/hostsfile'



cookbook "selenium", :git => 'https://github.com/kohkimakimoto/chef-cookbooks-selenium'

最佳答案

是的,该站点正在使用不受信任的 HTTPS 证书,而 librarian-chef 拒绝连接它是在做正确的事。这可能是因为您需要更新根信任数据库。通常,使用 Ruby 执行此操作的最简单方法是下载 the cURL CA bundle然后将环境变量 SSL_CERT_FILE 设置为指向您下载它的路径。我的 windows-fu 生锈了,但这应该能让你获得更新的 CA 列表。

关于ruby - 无法在 Windows 7 上安装 librarian-chef Recipe ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26042979/

相关文章:

html - 随机 CSRF token 真实性错误

ruby - 我无法在 cygwin 上启动 Chef

version - 在 Chef 客户端运行期间提取 Recipe 名称和版本

ruby - 为什么 relative_require 在 Ruby 1.8.6 上不起作用?

ruby-on-rails - 未实现错误 : fork() function is unimplemented on this machine

java - 如何使用 json 覆盖在 Chef Recipe 中安装 java 7

mysql - 存储mysql查询 Chef 信息

windows - 在资源 `create` 上执行操作 'directory[C:/topdir/subdir]' 时出错

ruby - 如何查看上传失败的具体 Recipe ?

ruby - 声明后分配哈希值