Reputation: 31
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...
Upvotes: 3
Views: 13731
Reputation: 11
If you've arrived here working with a PowerShell, especially trying to clone a local repo, this may help you.
PowerShell autocompleted my local repository path with a trailing \
that I had to remove.
e.g. git clone "<dir to>\<git repository folder>\"
should be git clone "<dir to>\<git repository folder>"
Hope that helps someone.
Upvotes: 1
Reputation: 254
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.
Upvotes: 4
Reputation: 31227
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 :
Upvotes: 0
Reputation: 1328522
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.
Upvotes: 0