Git克隆导致:“无法获取远程存储库信息”。

3

当我执行 ssh -v git@github.com 命令时,它可以正常通过身份验证。

然而,当我执行 git clone https://github.com/myusername/project.git 命令时,我遇到了以下错误:

Initialized empty Git repository in /home/webapps/myproject/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

我已经三次确认我输入的URL是正确的。另外,使用git://和http://协议都没有关系。有什么想法吗?


1
这不是命令的一部分,请查看格式。 - Ben G
2个回答

4

git clone git://github.com/myusername/project.git

这个命令应该会有所帮助。


0

尝试实际使用SSH协议(如果不指定协议,也会发生这种情况):

git clone git@github.com:username/project.git

还要仔细检查你输入的用户名和项目名称是否正确(如果你想克隆一个已存在的项目,还要确定你已经 fork 过这个项目)。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接