1
votes

I'm trying to use Laravel Homestead for a Laravel 4.2.9 project. Here's what I'm running:

  • Windows 8.1 64-bit
  • VirtualBox 4.3.17
  • Vagrant 1.6.5
  • Latest Homestead version

When running the box with vagrant up for the first time or issuing the vagrant provision command, I get this:

==> default: Running provisioner: shell...
    default: Running: inline script
==> default: /tmp/vagrant-shell: line 1: /home/vagrant/.ssh/$2: ambiguous redirect
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Contents of /tmp/vagrant-shell on the box:

echo "$1" > /home/vagrant/.ssh/$2 && chmod 600 /home/vagrant/.ssh/$2

This seems to be affecting nginx configuration as there is no default server conf and it's not listening on port 80 as expected. Presumably the provisioning script would handle that if it was able to proceed.

What might be causing this to happen?

1
It's just a bug in the Vagrant image/whatever provided with Laravel, I'm pretty sure they'll fix it in the next update.user2629998
Thanks André, I suppose I'll just keep an eye out for the next version then :)Riari

1 Answers

9
votes

I had the same problem and changed file homestead.rb in "scripts" directory by adding additional quotation marks and backslash around "$2".

s.inline = "echo \"$1\" > /home/vagrant/.ssh/\"$2\" && chmod 600 /home/vagrant/.ssh/\"$2\""