I am using Windows Subsystem for Linux (WSL) and have a mounted microSD card that I've been able to clone repositories into in the past. Recently, however, I am receiving this error when I try to clone from /mnt/d/
:
Cloning into 'your_repo'...
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I change into any directory on /mnt/c/
I can clone perfectly fine. When I clone I use SSH if that helps. Thank you.
From your repository page on GitHub, click the green button labeled Clone or download, and in the “Clone with HTTPs” section, copy the URL for your repository. Next, on your local machine, open your bash shell and change your current working directory to the location where you would like to clone your repository.
Considering changes to Chmod/Chown WSL Improvements, you could try, as in WSL issue 3172
sudo umount /mnt/d
sudo mount -t drvfs D: /mnt/d -o metadata
I saw that error on a fresh WSL Unbuntu install. I could of course not sudo umount /mnt/c
, however a reboot and all was well.
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