我应该事先注意到我在很大程度上是Linux-illiterate - 我是Windows用户,我想尝试使用Hack语言,这似乎是最快的启动和运行方式。
我跟着this tutorial series并尝试启动已配置的图片。
当我运行homestead up
或homestead provision
时,它会失败并显示相同的错误消息:
Rasmus Schultz@SIDEWINDER-7240 ~ $ homestead provision ==> default: Running provisioner: file... ==> default: Running provisioner: shell... default: Running: inline script ==> default: grep: unrecognized option '---- BEGIN SSH2 PUBLIC KEY ---- ==> default: Comment: "RasmusHomestead" ==> default: AAAAB3NzaC1yc2EAAAABJQAAAQEAhJ4eUnXFP7dCX98KtqNoZI9WwkE0+EBfuggt ...snip... ==> default: bVlGxJAHJd6u0vW9fssohiaUuo+8i48zHn8Ciqs5XVAn79m/PQ== ==> default: ---- END SSH2 PUBLIC KEY ---- ==> default: ' ==> default: Usage: grep [OPTION]... PATTERN [FILE]... ==> default: Try 'grep --help' for more information. ==> default: ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "RasmusHomestead" AAAAB3NzaC1yc2EAAAABJQAAAQEAhJ4eUnXFP7dCX98KtqNoZI9WwkE0+EBfuggt ...snip... bVlGxJAHJd6u0vW9fssohiaUuo+8i48zHn8Ciqs5XVAn79m/PQ== ---- END SSH2 PUBLIC KEY ---- ==> 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.
我尝试过更新Composer,Homestead,Vagrant,VirtualBox,Homestead盒子图片,我能想到的一切 - 我很确定它是最新的。
Rasmus Schultz@SIDEWINDER-7240 ~ $ homestead Laravel Homestead version 2.0.17 Rasmus Schultz@SIDEWINDER-7240 ~ $ homestead update ==> default: Checking for updates to 'laravel/homestead' default: Latest installed version: 0.2.6 default: Version constraints: default: Provider: virtualbox ==> default: Box 'laravel/homestead' (v0.2.6) is running the latest version. Rasmus Schultz@SIDEWINDER-7240 ~ $ composer global update laravel/homestead Changed current directory to C:/Users/Rasmus Schultz/AppData/Roaming/Composer Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files
这是我的Homestead.yaml
文件:
--- ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: C:\Users\Rasmus Schultz\.ssh\RasmusHomestead.pub keys: - C:\Users\Rasmus Schultz\.ssh\RasmusHomestead folders: - map: C:\workspace to: /home/vagrant/Code sites: - map: test.dev to: /home/vagrant/Code/test hhvm: true databases: - homestead variables: - key: APP_ENV value: local
这个grep
错误看起来像是在配置框内时发生的内部问题 - 好像发出的grep命令不是有效的?
是什么给出了?
更新
好的,第一个问题已经解决了 - 它期待一种不同的密钥格式,但是这并没有修复"模糊的重定向"错误消息...假设我必须重新提供?我关闭了流浪汉并重新开始,没有运气。
$ homestead provision ==> default: Running provisioner: file... ==> default: Running provisioner: shell... default: Running: inline script ==> 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.
答案 0 :(得分:1)
出现grep错误是因为它不喜欢用于公钥的默认putty格式。您需要将其重新保存为OpenSSH密钥。
这可以通过重新打开Putty Key Generator中的私钥文件,然后将公钥(在顶部标记为“公钥以粘贴到OpenSSH authorized_keys文件中”)复制/粘贴到密钥文件(新的一个或你现有的。)
如果您选择将其另存为新文件,则需要调整宅基地配置文件中的路径。