Search code examples
windowsgitpermissionsclone

Permission denied for git clone


I have been trying for two days to clone different repos from the internet into my machine.

The error I get is always:

Cloning into 'python-docs-hello-world'...

C:/Users/dream/Desktop/KhameleonPython/python-docs-hello-world/.git:
Permission denied Deletion of directory
'python-docs-hello-world/.git' failed. Should I try again? (y/n)

It is not a problem with the public key as I have found many other answers referencing. I have tried modifying the user permissions to full control from the KhameleonPython empty folder from Properties>Security, to no avail. I have accessed Component Services to give git full permission only not to find git among the local services listed there.

My git is installed in the F: drive and my file is under C:, could that be a problem? I have previously had this problem with other programs such as Node.js npm (init did't work with error EPERM) or atom wouldn't let me create new files in a folder from inside the text editor. Usually a reinstallation solved things but now it didn't. I run Microsoft Windows 10 Home Edition x64.

Am i missing something obvious?


Solution

  • If you have bitdefender, like I do, I had to allow git to make changes to the HDD by going into BitDefender > Application Access. After I allowed that connection, it worked just fine.