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.
Answers
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."
I confirm you need to create your repo on GitHub first, before being able to push to said (remote) repo.
Once created, you can add it as a remote named 'origin' to your local repo, and 'git push origin master' (for the first push).
Also note that the repository name is case sensitive. Oops!
Are you sure the git repo you're trying to access supports the HTTPS protocol?
Instead of this: git clone https://github.com/TeaCodie/TeaCodie-Website.git
Try this: git clone git@github.com/TeaCodie/TeaCodie-Website.git
You may need to configure your SSH key.
For some details, see: http://git-scm.com/book/ch4-1.html and https://help.github.com/articles/set-up-git and https://help.github.com/articles/generating-ssh-keys
The issue I had was due to the fact that the user didn't have write permission on the master branch.
Also, make sure the repository URL is reachable from your network.
In my case, my internet subscription was close to expiring so my service provider was redirecting all the HTTP/HTTPS calls to their renewal page.
So, GIT could not reach the repository.