Can't enter my password when trying to create a Laravel project with Sail on Windows
Asked Answered
M

4

11

I want to create a new Laravel 8 project and I followed the documentation with docker and Sail on Windows: https://laravel.com/docs/8.x#getting-started-on-windows

After I installed everything, I tried executing the command to create the project:

curl -s https://laravel.build/example-app | bash

It asked me for my password. I entered it and pressed enter, but nothing happened. When I press CTRL+C, I can see that it tried to execute my password as a command.

Milkfish answered 29/5, 2021 at 17:14 Comment(10)
have you tried doing it the other way around? using sudo su first, entering your password, and then using the curl command?Brainy
That seems to work, thanks!Milkfish
Now I get an error though. "chown: cannot access '.': No such file or directory"Milkfish
Oh well, thats weird af, as . is the current directory...Brainy
I know. It also didn't create the projectMilkfish
you did everything using root/sudo , right? And what directory are you in?Brainy
Yes. I just realized, there are other errors as well... "Cannot create project directory at "/opt/example-app", it exists as a file." and "bash: line 16: cd: example-app: No such file or directory"Milkfish
I think you are in a directory with restricted rights, go to your home and create a directory called projects, then go into that folder and repeat the commandBrainy
Yep, that worked! I was just in D:\projects, but putting it in C:\projects worked. Thanks a lot!Milkfish
I posted it as the answer :)Brainy
B
2

First of all you should create a folder called projects inside your home directory, then, go into that folder and execute sudo curl -s https://laravel.build/example-app | bash

You could also do sudo su and then curl -s https://laravel.build/example-app | bash

Brainy answered 29/5, 2021 at 17:50 Comment(0)
S
4

run it in WSL command line, not in windows command prompt.

it must work

Streamway answered 6/12, 2021 at 19:18 Comment(0)
B
2

First of all you should create a folder called projects inside your home directory, then, go into that folder and execute sudo curl -s https://laravel.build/example-app | bash

You could also do sudo su and then curl -s https://laravel.build/example-app | bash

Brainy answered 29/5, 2021 at 17:50 Comment(0)
O
1

Install Windows Terminal. Open it with your Linux distribution. And try again.

enter image description here

Ostracon answered 18/3, 2022 at 23:0 Comment(0)
F
0

💡

You have to run this command with sudo privileges on WSL:

or

sudo curl -s https://laravel.build/TaskFlow | bash
Featured answered 26/7, 2024 at 15:40 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.