我有 ubuntu 在 IP 地址为 192.168.0.92 的虚拟机客户机上运行,我可以从运行 Windows 7 的主机 ping 这台计算机。我也可以从 ubuntu ping 到 windows 的另一种方式。
在 ubuntu 中,我创建了一个像这样的裸存储库:
angus@angus-VirtualBox:~/Documents/Courses/oss/play$ git init --bare myexample.git
Initialised empty Git repository in /home/angus/Documents/Courses/oss/play/myexample.git/
angus@angus-VirtualBox:~/Documents/Courses/oss/play$ git daemon&
[1] 2790
在我的 Windows 7 主机上,我在 git bash 中运行了这些命令:
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone 192.168.0.92:myexample.git
Cloning into 'myexample'...
ssh: connect to host 192.168.0.92 port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone 192.168.0.92:myexample.git
Cloning into 'myexample'...
ssh: connect to host 192.168.0.92 port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone 192.168.0.92:/home/angus/Documents/Courses/oss/myexample.git
Cloning into 'myexample'...
ssh: connect to host 192.168.0.92 port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
我看到了 ssh 错误,所以我想我可能必须指定 git 协议,所以尝试了:
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone
git://192.168.0.92/home/angus/Documents/Courses/oss/play/myexample.git/
Cloning into 'myexample'...
fatal: remote error: access denied or repository not exported:
/home/angus/Documents/Courses/oss/myexample.git
angus@Angus-PC MINGW64 /d/projects/Coursera/open-source-software-development/gitstuff/client
$ git clone git://192.168.0.92:myexample.git
Cloning into 'myexample'...
fatal: No path specified. See 'man git-pull' for valid url syntax
我需要在克隆命令中指定什么路径?我怎样才能得到这个工作?