I have quantity 3 windows 7 professional machines. Two are setup as development machines (one desktop and one laptop) with Git installed. The third is setup as a file server wit
Well, after some time I worked out how to accomplish this.
git clone "ssh://user name@file-server:/D/path to/repo.git"
Git at the command line is no different from any other command that has spaces in it. Enclose it in quotes... To be more specific, double quotes are less restrictive if using special characters.
Having a Git repository on a drive other than the default install (C:/) drive does not complicate things.
The file extension '.git' is required for it to work.
Is the path case sensitive? Well, when using windows case sensitivity is not a problem. But, for you to be correct and error free (especially between OS), it is always best to reflect the practice of case sensitivity. IE: 'A' is different to 'a'.
Finally, to reflect a different drive letter to that which Git is installed, place a colon between the computer name and the forward slash. This was the issue tripping me up.
I hope this information helps other.
I have tried exactly the same and failed. The issue appears to be that a repo shall be on the c-drive on a windows platform.
I found no difference using either of
git clone "ssh://<user name>@<file-server>/<path to repo>"
git clone "ssh://<user name>@<file-server>/c/<path to repo>" <= note: changed 'd' to 'c'
git clone "ssh://<user name>@<file-server>/c:/<path to repo>"
To get to a repo on other drives I solved it by using windows links and a folder helper on the c-drive:
mkdir /<helper folder on c-drive>
cd /<helper folder on c-drive>
mklink /J <repo name> <drive letter>:/<path to repo>
Then clone from the helper folder
git clone "ssh://<user name>@<file-server>/<path to helper folder>/<repo name>"
Got the same problem in http cloning at Azure DevOps Server , Replaced all white spaces with "%20" Ex :-
git clone http://yourdomain/project%20collection/project1
try enclosing url with quotes plus spaces with %20 if above solution doesn't works.
Yes, you have to repo.git
in the end.
For example you can clone a existing git repository like this
git clone ssh://user@server:/GitRepos/myproject.git