Hello,
I was wondering what the difference is between vagrant provision and vagrant reload --provision? For me the former does not work, but the latter does? The error message I receive when I
run vagrant provision is `SSH authentication failed! This is typically caused by the public/private keypair for the SSH user not being properly set on the guest VM.`
My Vagrantfile looks as follows:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.synced_folder "./src", "/home/vagrant", mount_options: ["dmode=775,fmode=664"]
config.vm.box_check_update = true
config.vm.network "forwarded_port", guest: 80, host: 8080
# SSH
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/id_rsa.pub"
config.ssh.private_key_path = "~/.ssh/id_rsa"
# Provisioning
config.vm.provision "shell" do |s|
s.path = "provision.sh"
end
end
When I manually set config.ssh.username, vagrant provision works. However, I would like to setup SSH, so this is not a real solution to my problem.
Thanks in advance!
Jake