Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to create file ... Permission denied

Tags:

git

i am currently working on windows.

Sometimes i have problems when i try :

git checkout origin develop 

i have this error : error: unable to create file .... : Permission denied

"git status" show me the file in error not staged so i have to commit

What do i have to check ?

i tried to do this command line on my computer :

chown -R username directory 

We are severals people to work on a git repository and they have the problem too.

thanks for you help

like image 573
pop_up Avatar asked Jul 25 '16 06:07

pop_up


People also ask

How do I resolve permission denied error?

Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions that you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.

Why I Cannot create a directory permission denied?

If you receive an error telling you that you do not have permissions to create a directory or to write a file to a directory, this is likely an indication that your script is attempting to write to a directory that you do not own.

How do I fix mkdir permission denied?

[ErrorException] mkdir(): Permission denied Create a new folder, say 'myproject and run sudo chmod 777 myproject . Then move to 'myproject' folder and create project. To solve this problem, go into your laravel project, make your public directory writable.


2 Answers

In my case, my angular app was still running from ng serve, giving this:

Git Bash - ng serve

So I just had to close it with ctrl+c.

like image 92
Leo Avatar answered Sep 18 '22 16:09

Leo


I had the same issue and the problem was open files. Make sure you don't have the files git is trying to create open anywhere; close your localhost browser tabs if any of the files are open there; close all references to the files you are working with. That's what worked for me.

like image 20
Dave Avatar answered Sep 22 '22 16:09

Dave