Filename too long error during git clone

Filename too long error during git clone

In this article, explained how to fix Filename too long error during git clone. This error you might be seen while clone the project in the longer folder structure.

 

We need to set the core.longpaths true either in the specific cloned repository or global configuration.

We can fix this issue in two ways as follows.

 

Global Fixes

Start Git Bash as Administrator and run the following git config command.

git config --system core.longpaths true

For better close the administrator Git bash, and open the new Git bash normally and then clone the repository again.

 

Specific Repository Fixes

We need to pass core.longpaths=true in the git clone command.

Syntax: 
git clone -c core.longpaths=true <repo-url>

Example:
git clone -c core.longpaths=true https://github.com/narayanatutorial/DecodeIdToken.git

 

Leave a Reply