Git致命错误:找不到info / refs [英] Git Fatal Error: info/refs not found

查看:647
本文介绍了Git致命错误:找不到info / refs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误:

 致命:https://github.com/username/repository-name.git / info / refs找不到:您是否在服务器上运行git update-server-info? 

如果我尝试推送我的存储库而不在github.com上首先创建它。如果我首先在github上创建我的存储库,那么我可以推分支没有问题。这个程序是否常规?或者我做错了什么?我认为一个仓库可以在本地创建,并且无需先在github上创建仓库即可推送。 致命: https://github.com/username/repository-name.git/info/refs 找不到:你在服务器上运行git update-server-info?

在GitHub上下文中,这个消息应该被理解为该存储库不存在。你应该推进一个已经存在的裸仓库。裸仓库是没有工作目录的仓库,通常在服务器端找到。


$ b


如果我先在github上创建仓库,那么我可以推分支没问题。这个程序是否是例程?


是的。你应该首先在GitHub上创建你的仓库。请参阅 关于此问题的帮助主题



事实上,正如文档所述要将您的项目放在GitHub上,您需要有一个GitHub存储库供其使用。


I receive the following error:

fatal: https://github.com/username/repository-name.git/info/refs not found: did you run git update-server-info on the server?

if I try to push my repository without creating it first on github.com. If I create my repository first on github, then I can push branches no problem. Is this procedure routine? Or am I doing something wrong? I thought a repository could be created locally and pushed without first creating it on github.

解决方案

fatal: https://github.com/username/repository-name.git/info/refs not found: did you run git update-server-info on the server?

In GitHub context, this message should be understood as "The repository doesn't exist". You're supposed to push toward an already existing bare repository. A bare repository is a repository without a working directory, usually found server-side.

If I create my repository first on github, then I can push branches no problem. Is this procedure routine?

Yes. You're supposed to first create your repository on GitHub. See the help topic about this

indeed, as stated by the documentation "To put your project up on GitHub, you'll need to have a GitHub repository for it to live in."

这篇关于Git致命错误:找不到info / refs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆