fatal: cannot directory at '...': Invalid argument on git clone

3,407 views
Skip to first unread message

Carl

unread,
Mar 7, 2012, 9:57:48 AM3/7/12
to msysGit
git clone on Windows fails with message in subject line. git clone of
same repository on NetBSD and Linux works fine.

Occurs after "Resolving deltas: ...., done."

Updated to version 1.7.9-preview20120201 after failure on earlier
version but failure happens with version 1.7.9 as well.

Directory in message hasn't been created. Parent directory is present.
Sibling directory has been created. Nothing special/different about
directory name.

Ideas on getting more information about failure and possible
workarounds appreciated.

Erik Faye-Lund

unread,
Mar 7, 2012, 10:27:32 AM3/7/12
to Carl, msysGit
On Wed, Mar 7, 2012 at 3:57 PM, Carl <carl....@gmail.com> wrote:
> git clone on Windows fails with message in subject line.
> "fatal: cannot directory at '...': Invalid argument"

Are you sure you're not missing "create" in there? Because that's the
only such message that exists in Git (in entry.c).

If so, it seems the repo contains a directory called "...", which is a
bit odd. It seems Windows interprets all paths that consist only of
dots in some special ways, but a few quick searches didn't turn up any
relevant documentation.

> git clone of
> same repository on NetBSD and Linux works fine.
>

Not very surprising, at least Linux does not seem to disallow "...".
You're simply dealing with a repo with non-portable paths. Similar
issues will occur if you try to check out a repo with a folder named
"NUL" or "CON" or any of the other reserved names.

> Ideas on getting more information about failure and possible
> workarounds appreciated.

I'm afraid your only option is to rename that directory. Windows
doesn't seem to accept it.

Carl Soeder

unread,
Mar 7, 2012, 10:45:36 AM3/7/12
to kusm...@gmail.com, msysGit
The exact text of the message is:
 
Resolving deltas: 100% (214265/214265), done.
fatal: cannot create directory at 'netbsd/src/external/mit/xorg/lib/xcb-util/aux
': Invalid argument
Sorry I confused the discussion by using ... in my previous message.
git  successfully created the 'netbsd/src/external/mit/xorg/lib/xcb-util/atom' directory before the failure.

Erik Faye-Lund

unread,
Mar 7, 2012, 10:48:29 AM3/7/12
to Carl Soeder, msysGit
Please, do not top-post.

On Wed, Mar 7, 2012 at 4:45 PM, Carl Soeder <carl....@gmail.com> wrote:
> On Wed, Mar 7, 2012 at 10:27 AM, Erik Faye-Lund <kusm...@gmail.com> wrote:
>>
>> On Wed, Mar 7, 2012 at 3:57 PM, Carl <carl....@gmail.com> wrote:
>> > git clone on Windows fails with message in subject line.
>> > "fatal: cannot directory at '...': Invalid argument"
>>
>> Are you sure you're not missing "create" in there? Because that's the
>> only such message that exists in Git (in entry.c).
>>
>> If so, it seems the repo contains a directory called "...", which is a
>> bit odd. It seems Windows interprets all paths that consist only of
>> dots in some special ways, but a few quick searches didn't turn up any
>> relevant documentation.
>>
> The exact text of the message is:
>
> Resolving deltas: 100% (214265/214265), done.
> fatal: cannot create directory at
> 'netbsd/src/external/mit/xorg/lib/xcb-util/aux
> ': Invalid argument
> Sorry I confused the discussion by using ... in my previous message.
> git  successfully created the
> 'netbsd/src/external/mit/xorg/lib/xcb-util/atom' directory before the
> failure.
>

Right. Well, wrong path, same conclusion. "AUX" is a reserved pathname
on Windows:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

Johannes Schindelin

unread,
Mar 7, 2012, 10:59:38 AM3/7/12
to Erik Faye-Lund, Carl Soeder, msysGit
Hi,

On Wed, 7 Mar 2012, Erik Faye-Lund wrote:

> Please, do not top-post.
>
> {...}
>
> *** Please avoid top-posting. ***

DRY

;)
Dscho

Reply all
Reply to author
Forward
0 new messages