git push origin master 上的致命错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11018358/
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 07:03:56  来源:igfitidea点击:

Fatal error on git push origin master?

gitgithub

提问by AquaVita

I did push origin master and after that I have an error:

我确实推送了 origin master,然后我有一个错误:

$ git push origin master

fatal: https://github.com/myusername/my-first-project-test.git/info/refsnot found: did you run git update-server-info on the server?

$ git push origin master

致命:https: //github.com/myusername/my-first-project-test.git/info/refsnot found:你在服务器上运行了 git update-server-info 吗?

I did:

我做了:

$ git update-server-info

$ git 更新服务器信息

but it doesn't help at all.

但它根本没有帮助。

回答by Luca Geretti

This seems to be an authorization problem.

这似乎是一个授权问题。

I would suggest you try to use the ssh protocol rather than https:

我建议您尝试使用 ssh 协议而不是 https:

[email protected]:<user>/<reponame>.git 

(source)

来源

Also, make sure that in your global .gitconfigyou have

另外,请确保在您的全球范围内.gitconfig您有

[http]
      sslVerify = true

You can fix that from the command line by issuing

您可以通过发出以下命令从命令行修复该问题

git config --global http.sslVerify true

(source)

来源