Git clone - Filename too long error

Kontext Kontext visibility 1,033 event 2022-12-11 access_time 10 months ago language English

Context

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

References

Git - git-config Documentation (git-scm.com)

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

More from Kontext
copyright This page is subject to Site terms.
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts