0

When I try to run vagrant up I get the error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

SSH:
* `private_key_path` file must exist: /home/buildbot/mykey.pem

However, this file definitely exists. If I run ls -lah /home/buildbot/mykey.pem, it's there. It's owned by my user "buildbot". It has the right permissions. Everything looks good, but yet Vagrant can't see it, even though it's running as user "buildbot". Why would this be?

My Vagrantfile is a fairly generic one for AWS:

# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'vagrant-aws'
Vagrant.configure(2) do |config|
  config.vm.box = 'aws-dummy'
  config.vm.provider :aws do |aws, override|
    aws.keypair_name = 'my-key-pair'
    aws.security_groups = ['my-security-group']
    aws.access_key_id = ENV['AWS_ACCESS_KEY']
    aws.secret_access_key = ENV['AWS_SECRET_KEY']
    aws.ami = 'ami-43c92455'
    override.ssh.username = 'ubuntu'
    override.ssh.private_key_path = ENV['AWS_PRIVATE_KEY_PATH']
  end
end
Cerin
  • 60,957
  • 96
  • 316
  • 522
  • You are asking a question to an audience who has no access to your system, but instead of showing the facts you present your opinions: "*has the right permissions. Everything looks good*". What is the purpose of this post then? If everything looks good, then the only answer possible is: you are the good guy, Vagrant is bad. – techraf Jan 19 '17 at 00:45
  • May be duplicate of this from 2015? http://stackoverflow.com/questions/29673065/how-to-fix-vagrant-error-private-key-path-file-must-exist – spooky Jan 19 '17 at 01:25
  • another thread on this: http://stackoverflow.com/questions/25017624/vagrant-ssh-private-key-path-file-must-exist – spooky Jan 19 '17 at 01:26

0 Answers0