Failed to start Laravel Homestead on Windows (grep error)
I have to point out up front that I am mostly Linux illiterate - I am a Windows user, I would love to try the Hack language and that seemed like the fastest way to get up and work.
I followed this series of tutorials and got to the point of running a configured image.
When I run homestead up
or homestead provision
, it crashes with the same error message:
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.
I've tried updating Composer, Homestead, Vagrant, VirtualBox, Homestead box image, whatever I could think of - I'm sure I'm all up to date.
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
Here's my Homestead.yaml
file:
--- 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
This error grep
looks like an internal problem inside the field when it is initialized - as if the grep command is being issued?
What gives?
UPDATE:
Ok, the first issue is resolved - it was expecting a different key format, but that didn't fix the "ambiguous redirect" error ... assuming I need to resubmit? I shut down the tramp and started again with no luck.
$ 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.
source to share
The grep error occurs because it doesn't like the default bookmark format used for public keys. You need to save it as an OpenSSH key.
This can be achieved by reopening the private key file in the Putty key generator and then copying / pasting the public key (found at the top, labeled "Public Key to Paste in OpenSSH authorized_keys file") into the key file (either a new one or your existing ).
If you choose a to save it as a new file, you will need to adjust the path in your homestead config file.
source to share