I’ve encountered this error message when attempting to clone a git repo on a linked folder within WSL. This also happens on any mounted Windows drive when working with WSL.
Cloning into ‘pw-iam’…
error: chmod on /mnt/c/projects/pw-iam/.git/config.lock failed: Operation not permitted
fatal: could not set ‘core.filemode’ to ‘false’
I’m not sure of the fix. Perhaps if someone stumbles upon this post could advise a fix, otherwise this isn’t much of use other than a note to self.