markl17
markl17

Reputation: 25

vagrant up provider=aws produces an error

this is my 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

then I get an error which i dont know what to do with

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)

any ideas how to get this box running on aws

Upvotes: 1

Views: 262

Answers (2)

MichaelZ
MichaelZ

Reputation: 1910

Put these three lines at the top of Vagrantfile to work around the issue.

require 'rubygems'
require 'excon'
Excon.defaults[:ssl_verify_peer] = false

Upvotes: 0

saranicole
saranicole

Reputation: 2453

I found the answer at https://github.com/excon/excon/issues/13. You have to add:

require 'rubygems'
require 'excon'

to your /.chef/knife.rb

then disable SSL verification by adding:

Excon.defaults[:ssl_verify_peer] = false

You should also be able to specify the cert directory using:

Excon.defaults[:ssl_ca_path] = "path/to/certs"

but I was not able to get that to work.

Upvotes: 1

Related Questions