Git clone - Filename too long error

visibility 29 event 2022-12-11 access_time 2 months ago language English


For some repositories like Hadoop and Spark, the file paths can be very long. When cloning these repositories using Git Bash, you may encounter this error - Filename too long.

Fix this issue

To fix this issue, you can just simply add another option when cloning:

git clone --config core.longpaths=true <url>

Another approach

If you don't want to add this configuration option each time, you can simply add it into your git configurations. 

git config core.longpaths true
# Or add it globally
git config --global core.longpaths true


Git - git-config Documentation (

java - How to fix "Filename too long error" during git clone

copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

recommendMore from Kontext