I am new to developing, and I am trying to clone a repository from GIT. The only problem is my clone command is not working. Initially it did work, then I decided to delete everything and start over. Except once I tried to reinstall everything, it states I no longer have permission. Can anyone tell me why this is and/or how I can fix it? The command line looks a little like so:
someoneinbed@Micheal-PC:/mnt/c/Users/msazm$ git clone https://github.com/blechschmidt/massdns.git
Cloning into 'massdns'...
error: chmod on /mnt/c/Users/msazm/massdns/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
I would put my initial attempt, but I deleted everything in hopes of starting over.
In your error message, it is evident that the issue stems from a permission problem. Given the path you provided, it appears that you are using WSL. NTFS (Windows file system) does not support Linux-style permission management, such as the chmod
command. When WSL attempts to apply such permissions, conflicts arise.
To resolve this, you can directly operate within the Linux file system of WSL, rather than using the /mnt/c
path.
cd ~ # Switch to WSL's home directory (e.g., /home/yourusername/)
git clone https://github.com/blechschmidt/massdns.git
btw, if you are using WSL, it is recommended that you place your development files within the WSL file system (e.g., ~/projects/
), rather than in /mnt/c/
, to avoid permission issues.