这是我的vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "Asome codeQ"
aws.secret_access_key = "woEbLL some code 3TRYD3wW"
aws.keypair_name = "moshe"
aws.ami = "ami-7747d01e"
aws.region = "ap-northeast-1"
#aws.security_groups = ['test']
aws.instance_type = "t1.micro"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "moshe.pem"
end
end
然后我收到错误,我不知道如何处理
Error occurred: Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file` or `Excon.defaults[:ssl_verify_peer] = false` (less secure)
如何让这个盒子在aws上运行
答案 0 :(得分:1)
我在https://github.com/excon/excon/issues/13找到答案。你必须添加:
require 'rubygems'
require 'excon'
到你的/.chef/knife.rb
然后添加以下内容禁用SSL验证:
Excon.defaults[:ssl_verify_peer] = false
您还应该能够使用以下方法指定cert目录:
Excon.defaults[:ssl_ca_path] = "path/to/certs"
但我无法让它发挥作用。
答案 1 :(得分:0)
将这三行放在Vagrantfile的顶部以解决此问题。
require 'rubygems'
require 'excon'
Excon.defaults[:ssl_verify_peer] = false