Ruby vagrant up provider=aws产生错误
这是我的流浪汉档案Ruby vagrant up provider=aws产生错误,ruby,amazon-web-services,vagrant,Ruby,Amazon Web Services,Vagrant,这是我的流浪汉档案 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
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上运行吗?我在网站上找到了答案。您必须添加:
require 'rubygems'
require 'excon'
给你的/.chef/knife.rb
然后通过添加以下内容禁用SSL验证:
Excon.defaults[:ssl_verify_peer] = false
您还应该能够使用以下命令指定证书目录:
Excon.defaults[:ssl_ca_path] = "path/to/certs"
但我没能做到这一点。将这三行放在Vagrant文件的顶部,以解决这个问题
require 'rubygems'
require 'excon'
Excon.defaults[:ssl_verify_peer] = false
这不是一种不安全的做事方式吗