question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cloning failed- fatal: cannot create directory - Invalid argument

See original GitHub issue

Description

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

  1. Clone https://github.com/Diyago/ML-DL-scripts
  2. ???
  3. 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:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
stevewardcommented, Nov 30, 2018

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.

3reactions
e-g1gorcommented, Nov 30, 2019

This happened one my environment, even the path has no colon:

fatal: cannot create directory at ‘src/main/java/com/e/m/test/cat/i/helpers/con’: Invalid argument

Bruce

There’s forbidden file names in windows, check this out

Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended. For more information, see Namespaces.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git can not create directory, Invalid argument, when using ...
Solution · Rename the directory in git on another system and attempt the build again. · Delete the branch or branches with offending...
Read more >
Why do I get "cannot create directory" when checkout a git ...
I cloned the project and switched to the branch in a debian virtual machine, and it worked without any issues. It seems like...
Read more >
Cloning failed- fatal: cannot create directory ... - Checkmarx
When you try to clone a repository, you receive the error, "failed: cannot create directory at 'Turing/Targets/Turing/Screens/VideoPlayer/Aux': Invalid ...
Read more >
fatal: cannot directory at '...': Invalid argument on git clone
git clone on Windows fails with message in subject line. > "fatal: cannot directory at '...': Invalid argument". Are you sure you're not...
Read more >
fatal: cannot create directory at 'src/components/aux': Invalid ...
Trying to clone the repo on a Windows machine is failing because of ... cannot create directory at 'src/components/aux': Invalid argument.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found