WSL git clone error
Git clone with Ubuntu WSL, and an error occured.
error: chmod on /mnt/d/nshawn4675.github.io/.git/config.lock failed: Operation not permitted
Because /mnt/d is a NTFS partition so that chmod doesn’t work.
Steps to solve this problem:
- Launch Ubuntu WSL
-
Create / Modify WSL conf file
$ sudo vi /etc/wsl.conf [automount] options = "metadata"
-
Shutdown WSL with PowerShell
wsl --shutdown
- Relaunch Ubuntu WSL