Laravel homestead not mapping my code folder
Solution 1
sstarlight was on the right track. It's a path name issue. I'm on windows 8 with homestead too and you need to use the forward slashes even in your windows paths.
The below should do the trick!
authorize: C:/Users/Khalid/.ssh/id_rsa.pub
keys:
- C:/Users/Khalid/.ssh/id_rsa
folders:
- map: D:/work
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
I would add to this that you should run the provisioning as per the other answer after you make the change by bringing your homestead up with the --provision flag set.
Solution 2
Make sure and re-verify that the path for the keys
and authorize
are correct and run vagrant up --provision
to re-provision the homestead setup again
Khalid Dabjan
Updated on June 29, 2022Comments
-
Khalid Dabjan almost 2 years
I am trying to get homestead to work after following the instructions here
I have Virtualbox 5.0.6 and Vagrant 1.7.4 on windows 8. The machine boots up fine(ish) the only problem is that my mapped folder is not present on the vm, meaning when I
vagrant ssh
, the directory/home/vagrant/
is empty, there is noCode
directory inside of it. This is a screenshot of the machine booting(it should keep going and saying mapping the folders and stuff):And this is the content of my
Homestead.yaml
file--- ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: C:\Users\Khalid\.ssh\id_rsa.pub keys: - C:\Users\Khalid\.ssh\id_rsa folders: - map: D:\work to: /home/vagrant/Code sites: - map: homestead.app to: /home/vagrant/Code/Laravel/public databases: - homestead variables: - key: APP_ENV value: local # blackfire: # - id: foo # token: bar # client-id: foo # client-token: bar # ports: # - send: 93000 # to: 9300 # - send: 7777 # to: 777 # protocol: udp
Could someone please help, Thanks
EDIT: The full output of
vagrant up --debug
can be found here -
Khalid Dabjan over 8 yearsNo, same thing happened.
-
Khalid Dabjan about 6 years@swapnilsaha I couldn't solve it :\ I had to switch to using wamp back then, until I replaced my windows machine with a mac book.