Ashwin Nanjappa
Ashwin Nanjappa

Reputation: 78478

Git on Windows: could not create leading directories error

I have installed MsysGit on Windows. The following command invoked from the cmd.exe command-line gives error:

C:\Users\joe>git clone 'git://github.com/MarcWeber/vim-addon-manager-known-repositories.git' 'C:/Users/joe/vim-addons/vim-addon-manager-known-repositories'
fatal: could not create leading directories of ''C:/Users/joe/vim-addons/vim-addon-manager-known-repositories'': Invalid argument

The same command issued in the command prompt of Git Bash works fine.

What do I fix to make the normal command-line version work? This command is issued from within Vim, so I need it to work from cmd.exe.

Upvotes: 5

Views: 11896

Answers (2)

leo
leo

Reputation: 1

Please refer to this issue in github of vunble.

https://github.com/gmarik/vundle/issues/283

The solution is very simple, just comment the line of shellslash with '"'

Best wishes.

Upvotes: 0

Alex Budovski
Alex Budovski

Reputation: 18436

don't use single quotes on windows cmd. Use double quotes for paths with spaces, or no quotes at all when no spaces exist.

In your case, no spaces are in the path, so no quotes are necessary.

E.g.

C:\path\no\spaces               // ok
"C:\Program Files\Some Spaces"  // ok
'C:\Program Files\Foo'          // wrong.

Upvotes: 6

Related Questions