Git fatal error : info/refs not found

标签 git github

我收到以下错误:

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

如果我尝试推送我的存储库而不先在 github.com 上创建它。如果我首先在 github 上创建我的存储库,那么我可以毫无问题地推送分支。这个程序是常规的吗?还是我做错了什么?我认为一个存储库可以在本地创建并推送,而无需先在 github 上创建它。

最佳答案

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

在 GitHub 上下文中,此消息应理解为“存储库不存在”。您应该推向一个已经存在的裸存储库。裸仓库是没有工作目录的仓库,通常位于服务器端。

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

是的。您应该首先在 GitHub 上创建您的存储库。参见 help topic about this

确实,正如文档所述“要将您的项目放在 GitHub 上,您需要有一个 GitHub 存储库来 stash 它。”

关于Git fatal error : info/refs not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12406963/

相关文章:

使用 OAuth 访问 token 的 GitHub 克隆

version-control - 我如何通知所有分支我的代码发生了重大变化?

git - Github 上的高级搜索?

Git SSH 设置权限被拒绝(公钥)

windows - 为什么 git-upload-pack(在 git clone 期间)会挂起?

php - 修改 Symfony Composer 供应商并使用它们直到他们的 PR 被 merge

github - Go,如何从 github 导入包并在不使用 go get 的情况下构建

github - 使用 SSH 身份验证在 Xcode 7 中添加 GitHub 存储库会出现身份验证错误

git - 在 git 中推送特定提交

git - Integrator 工作流程,fetch-rebase-push 对于远程 repo 是否安全?