Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

github - Git Fatal Error: info/refs not found

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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."


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...