错误:无法验证 www.opscode.com 的证书

错误:无法验证 www.opscode.com 的证书

我在 Ubuntu 12.04 LTS 上使用 OSS Chef 11.0.4,在运行 Knife ec2 create 命令时出现以下错误

在 ec2-xx-xx-xxx-xx.compute-1.amazonaws.com 上引导 Chef

  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com --2014-02-20 12:26:15--  https://www.opscode.com/chef/install.sh
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com Resolving www.opscode.com (www.opscode.com)... 184.106.28.90
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com Connecting to www.opscode.com (www.opscode.com)|184.106.28.90|:443... connected.
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com ERROR: cannot verify www.opscode.com's certificate, issued by ‘/C=US/O=DigiCert Inc/CN=DigiCert Secure Server CA’:
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com   Unable to locally verify the issuer's authority.
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com To connect to www.opscode.com insecurely, use `--no-check-certificate'.
  ec2-xx-xx-xxx-xx.compute-1.amazonaws.com bash: line 88: chef-client: command not found

非常感谢您的帮助。

答案1

我在 chef-full.erb 文件中找到了答案,我们需要禁用 ssl 检查

  /usr/local/rvm/gems/ruby-1.9.3-p484-devel/gems/chef-11.10.4/lib/chef/knife/bootstrap/chef-ful

 install_sh="https://www.opscode.com/chef/install.sh"

将其更改为

 install_sh="http://www.opscode.com/chef/install.sh"

 wget --no-check-certificate

使用--no-check-certificate

相关内容