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

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

Your email address will not be published. Required fields are marked *

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