Git Error When Clone Repository: chmod on config.lock failed

Share
Cloning into '<repo>'...
error: chmod on /mnt/c/<repo>/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'

Above error message shown when Git tried to clone repository in mounting file system in Linux.

To solve this issue, we have to edit /etc/fstab file and change uid and guid options.

My uid and guid is 1000. It can be checked from /etc/passwd file.

After edit /etc/fstab file, restart the system. Now git able to clone without issue.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.