github http clone 返回“您是否在服务器上运行了 git update-server-info”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9786013/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:38:23  来源:igfitidea点击:

github http clone returns 'did you run git update-server-info on the server'

gitgithub

提问by probably at the beach

I'm trying to clone a github project on windows. I'm behind a firewall so can't use ssh. Running:

我正在尝试在 Windows 上克隆一个 github 项目。我在防火墙后面,所以不能使用 ssh。跑步:

 git clone https://github.com/user/project.git

is returning https://github.com/user/project.git not found: did you run git update-server-info on the server?

正在返回 https://github.com/user/project.git not found: did you run git update-server-info on the server?

As it's not my project, is there a way to get around this?

由于这不是我的项目,有没有办法解决这个问题?

EDIT:

编辑:

The project I'm trying to clone is:

我试图克隆的项目是:

 https://github.com/mitsuhiko/jinja2.git

EDIT: Sorry people - was a typeo. Git Bash on windows does't let you copy paste and i missed a letter.

编辑:对不起的人 - 是一个类型。Windows 上的 Git Bash 不允许您复制粘贴,我错过了一封信。

回答by VonC

One usual reason is the case (or, in this instance, according to the OP directedbit, a simple typo) .
GitHub repo url is case sensitive, as explained in "Why are Github project document page urls case sensitive? What are the negative effects?".

一个通常的原因是这种情况(或者,在这种情况下,根据OP directbit,一个简单的错字)。
GitHub repo url 区分大小写,如“为什么 Github 项目文档页面 url 区分大小写?有哪些负面影响?”中所述。

See as an illustration this GitHub repo issue:

请参阅此GitHub 存储库问题的说明:

I had the same issue but the fix is insanely simple.
Lack of capitalisation for KnpLabsin the URLs so use the following instead.

我有同样的问题,但修复非常简单。URL 中
缺少大写,KnpLabs因此请改用以下内容。

[KnpMenu]
git=https://github.com/KnpLabs/KnpMenu.git

[KnpMenuBundle]
git=https://github.com/KnpLabs/KnpMenuBundle.git
target=bundles/Knp/Bundle/MenuBundle

=> Update your urls from
knplabs/KnpMenuBundle.gitto
KnpLabs/KnpMenuBundle.git(case change)

=> 将您的 url 更新
knplabs/KnpMenuBundle.git
KnpLabs/KnpMenuBundle.git(case change)