Reputation: 335
I'm new to using Git and I am trying to understand why I cannot clone a remote repository using SSH. When I try to, it states that the System Cannot find the path specified.
git clone -u /mingw64/bin/git-upload-pack ssh://[email protected]/Git/quizinator
However, I can clone the repository just fine using the following command.
git clone -u /mingw64/bin/git-upload-pack file:////10.20.32.7/Git/quizinator
I've tried creating the a repo under the program files and even under the user account and I always get the same results. I just do not understand why one method works and the other does not.
Upvotes: 0
Views: 130
Reputation: 487725
When you use a file://
URL, the -u
argument to git clone
is ignored:
--upload-pack <upload-pack>
,-u <upload-pack>
When given, and the repository to clone from is accessed via ssh, this specifies a non-default path for the command run on the other end.
(emphasis mine). The file://
URL makes your Git do all the work itself (your Git acts as both sender and receiver), so the file://
clone is quite unrelated to anything SSH-ish.
Given the URL, you might try:
ssh [email protected] ls -l /mingw64/bin/git-upload-pack
to see what the other machine thinks about /mingw64/bin/git-upload-pack
(I'm asssuming ls -l
will work due to mingw64; I don't "do" Windows though). If that works, you can then try:
ssh [email protected] ls -ld Git/quizinator
to see what it thinks of that.
Upvotes: 1