[英]git clone from a vps
I'm having some trouble cloning my repository 我在克隆我的存储库时遇到了一些麻烦
$git clone ssh://root@8x.12x.9x.21x:/repo repo
Cloning into 'repo'...
fatal: '/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
while i'm having no such trouble cloning on the vps itself. 虽然我在vps本身克隆没有这样的麻烦。 nor did i have trouble pushing to it from another computer.
我也没遇到从另一台电脑上推它的麻烦。
$ ssh root@8x.12x.9x.21x
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 2.6.32-042stab111.11 x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Tue Mar 8 12:29:47 2016 from 80.79.35.115
root@vps:~# ls
deployment_test my-project repo
root@vps:~# git clone repo repo2
Cloning into 'repo2'...
done.
Does anybody know what might be the problem? 有人知道可能是什么问题吗?
Use 采用
git clone ssh://root@8x.12x.9x.21x:/root/repo
You may omit the colon because you're using the standard port. 您可以省略冒号,因为您正在使用标准端口。
git clone ssh://root@8x.12x.9x.21x:/root/repo
For completeness, SSH clone URLs also work as in 为了完整性,SSH克隆URL也可以像以下一样工作
git clone root@8x.12x.9x.21x:/root/repo
or with a relative path because it is in root's home directory. 或者使用相对路径,因为它位于root的主目录中。
git clone root@8x.12x.9x.21x:repo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.