On my Windows machine, when I pull my repo I get:
error: unable to crate file <path to file> (Permission denied)
I think the problem might be that when I look at the properties of the folder there is a square inside the checkbox, I clear it out so that no files or folders will be read only.
After pressing ok and checking to see if Windows applied my changes, I see the square again!
How can I get Git or Windows to allow me to get my commits?
In terminal enter this command with your ssh file name pbcopy < ~/. ssh/id_rsa. pub This will copy the file to your clipboard Now open you github account Go to Settings > SSH and GPG keys > New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.
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.
Conclusion. The Bash permission denied error indicates you are trying to execute a file which you do not have permission to run. To fix this issue, use the chmod u+x command to give yourself permissions. If you cannot use this command, you may need to contact your system administrator to get access to a file.
This error occurs when the user does not have the privileges to make edits to a file. Root has access to all files and folders and can make any edits. Other users, however, may not be allowed to make such edits. Remember that only root or users with Sudo privileges can change permissions for files and folders.
Run the Git Bash or the console you are running, with Run As Administrator
Check if another application is using your files and kill it. In my case it was grunt, always watching for the changes and building project. Gave me the same message as yours, when discarding files.
How it happened? When I've switched to another branch, some non-existent files appeared in my working copy. I could not Discard them, nor open in the text editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With