我正在尝试将 Laravel Homestead 用于 Laravel 4.2.9 项目。这是我正在运行的:
- Windows 8.1 64 位
- VirtualBox 4.3.17
- Vagrant 1.6.5
- 最新的 Homestead 版本
当第一次使用 vagrant up 运行盒子或发出 vagrant provision 命令时,我得到这个:
==> 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.
盒子上/tmp/vagrant-shell的内容:
echo "$1" > /home/vagrant/.ssh/$2 && chmod 600 /home/vagrant/.ssh/$2
这似乎影响了 nginx 配置,因为没有默认的服务器 conf 并且它没有按预期监听端口 80。如果供应脚本能够继续,大概会处理它。
可能导致这种情况发生的原因是什么?
最佳答案
我遇到了同样的问题,并通过在“$2”周围添加额外的引号和反斜杠来更改“scripts”目录中的文件 homestead.rb。
s.inline = "echo\"$1\">/home/vagrant/.ssh/\"$2\"&& chmod 600/home/vagrant/.ssh/\"$2\""
关于windows - Laravel 家园 : Provisioning failing on Windows 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25953499/