Archive for May, 2021

Laravel on windows: Private key does not exist

Thursday, May 27th, 2021

I was setting up my Laravel development using the Homestead on a new laptop and my usual tool chain includes installing git and using git bash. When I tried the ‘vagrant up’ command I got the following error:

Check your Homestead.yaml (or Homestead.json) file, the path to your private key does not exist.

The default location for that file is the .ssh directory within your home directory. This directory does not exist unless you have run the ssh-keygen tool to create it. Run the following command to generate the key file. For local development you can just use the default options.

ssh-keygen -t rsa -C "you@homestead"

Once the file is generated you can run ‘vagrant up’ and continue your development.