Git Error

“error: invalid path”

Summary

The Git cloning of repository succeeds on a Linux client but fails on a Windows client with an “invalid path” error.

Solution

Depending on the filename, configuring Git to ignore NTFS naming may workaround the issue.

1
git config --global core.protectNTFS false

Turning off protectNTFS will stop Git from complaining about files that have a base name that is reserved but will not prevent an error if the filename is one of the reserved names.