I installed Git via Cygwin on Windows Server. It works out very well. However there's a small issue that when I clone a repo use the command as following:
$git clone git@myserver:project.git
I always get the following error:
fatal: '/project.git': unable to chdir or not a git archive
but if I typed in the开发者_JAVA技巧 full path then it works
$git clone git@myserver:/home/git/repositories/project.git
Did anyone here face this problem before?
Regards, TL
By default, git clone
uses SSH as the transfer protocol. When connecting over SSH, you have to specify the full path to the repository -- you cannot use a relative path like project.git
.
If the machine storing the repos instead uses git daemon
to serve the repos, and you connect via the Git protocol, then you can specify base path for the repos using the --base-path=path
flag for git daemon
.
精彩评论