3

First attempt trying to figure out Git & GitHub. Using Git Extensions on Windows. Fresh install. I made an SSH Key pair, put the public key in a Github account I just made, and loaded the private key before trying to clone a repo.

It doesn't seem to matter what repo I try to clone, I keep getting the same error, and I don't know why.

"git" clone -v --recurse-submodules --progress "https://github.com/astranauta/5etools.git" "H:/GIT/astranauta/5etools/5etools"
fatal: could not create work tree dir 'H:/GIT/astranauta/5etools/5etools"': Invalid argument

Done

Press Enter or Esc to close console...
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Hawkwinter
  • 31
  • 1
  • 1
  • 2

3 Answers3

4

In my case the problem was with repositry name e.g I mistakenly added one extra . to the end of repositry name while creating repositry. The name was like CRUD-With-GraphQL..git. So the . before .git was the actual issue. I renamed my repositry, removed the extra . and the problem was resolved.

Sharryy
  • 224
  • 4
  • 11
0

As a workaround, try, in a regular CMD with git in your %PATH%:

cd H:\GIT\astranauta\5etools
git clone -v --recurse-submodules --progress https://github.com/astranauta/5etools.git

No need for double-quotes around git.

If you were in a git bash, I would have tried

git clone -v --recurse-submodules --progress https://github.com/astranauta/5etools.git /H/GIT/astranauta/5etools/5etools

Again, there shouldn't be any double-quotes, unless you have spaces in the path.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • This workaround cloned the repo properly. Is GitExtensions just broken? I don't know why it was putting quotes around things. Can you point me to a good guide to using GIT from the windows command prompt, since apparently the automated tool doesn't work so well? (How come I didn't have to enter in my SSH keys or anything to show who I am?) – Hawkwinter Jul 20 '17 at 04:57
  • @Hawkwinter ssh is need for pushing only (or pulling from a private repo that you own). Otherwise, using git from CMD is pretty much a normal use of git commands, shown in https://git-scm.com/docs – VonC Jul 20 '17 at 05:00
0

I think that the problem come from an optional component of GitExtensions called "Conemu". It perhaps will fail at other moments... Could you try to disable it using this documentation :

https://git-extensions-documentation.readthedocs.io/en/latest/settings.html#advanced-general-use-console-emulator-for-console-output-in-command-dialogs

Philippe
  • 28,207
  • 6
  • 54
  • 78