Cloning failed- fatal: cannot create directory - Invalid argument
See original GitHub issueDescription
Tried to clone this repository https://github.com/Diyago/ML-DL-scripts but failed with fatal: cannot create directory - Invalid argument Other repository successful cloned . I believe the problem related with wrong long file/folder names
Version
- GitHub Desktop: 1.5.0 (the last version)
- Operating system: Windows 10
Steps to Reproduce
- Clone https://github.com/Diyago/ML-DL-scripts
- ???
- Get fatal: cannot create directory - Invalid argument
Expected Behavior
To clone the repository
Actual Behavior
fatal: cannot create directory - Invalid argument.
Additional Information
Logs
Cloning into ‘C:\Users\Insaf.Ashrapov\Desktop\ml\ML-DL-scripts’…
remote: Enumerating objects: 10, done.
remote: Counting objects: 10% (1/10)
…
remote: Counting objects: 100% (10/10)
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 11% (1/9)
…
remote: Compressing objects: 100% (9/9)
remote: Compressing objects: 100% (9/9), done.
Receiving objects: 0% (1/811)
Receiving objects: 1% (9/811)
…
Receiving objects: 15% (122/811)
Receiving objects: 15% (125/811), 332.01 KiB | 321.00 KiB/s
…
Receiving objects: 99% (803/811), 88.37 MiB | 6.70 MiB/s
Receiving objects: 100% (811/811), 88.37 MiB | 6.70 MiB/s
Receiving objects: 100% (811/811), 89.17 MiB | 5.03 MiB/s, done.
Resolving deltas: 0% (0/289)
Resolving deltas: 5% (16/289)
…
Resolving deltas: 98% (286/289)
Resolving deltas: 100% (289/289)
Resolving deltas: 100% (289/289), done.
fatal: cannot create directory at ‘DEEP LEARNING/Kaggle: Avito Demand Prediction Challenge (bronze solution)’: Invalid argument
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with ‘git status’
and retry the checkout with ‘git checkout -f HEAD’
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Thanks for the report @Diyago.
It looks like there is a colon in the
DEEP LEARNING/Kaggle: Avito Demand Prediction Challenge (bronze solution)
directory name, which is why the clone is failing. Colons are reserved characters on Windows operating systems.Do you have access to a Linux or macOS system where you could rename this directory? You could also install the Linux Subsystem for Windows to clone the repository and then rename the directory. Once you remove the colon from the directory name and push that change back up to GitHub you should be able to clone this repository without issue on Windows.
Edit: Updated my response since the colon, not the parentheses, was the issue.
There’s forbidden file names in windows, check this out