Arkaaito
Arkaaito

Reputation: 7387

Init github repository

I've just created a new Github repository, but apparently forgot to allow Github to create the README and so on with which it helpfully offers to initialize the repository.

I attempted to create this locally and push it with the following commands:

git remote add origin
git push -u origin master

However, it keeps giving me the error:

https://github.com/Arkaaito/<repo>/info/refs not found: did you run git update-server-info on the server?

I don't know how to run git update-server-info on Github because Github does not provide shell access via ssh; there's got to be some UI option for it somewhere, but I don't know where. Can anyone help me find the blindingly obvious?

Upvotes: 0

Views: 1041

Answers (2)

Robert Rouhani
Robert Rouhani

Reputation: 14678

Could you post the result of git remote show origin From the looks of the error you got, you simply forgot to include the repo name after your username...

Also, the error is mentioned on this GitHub help article as the result of using a really old version of git or not having push access to a repo. (It can also be the result of an incorrect remote origin URL, for instance a URL with incorrect capitalization.)

EDIT: Just noticed that it was the formatting that made <repo> appear blank, it's most likely that you just have an older version of git, so update.

Upvotes: 1

Kjuly
Kjuly

Reputation: 35161

  1. Create a repo on Github.
  2. Create a repo on your local machine:

    $ cd Foo  
    $ touch README.md  
    $ git init  
    $ git add .
    $ git commit -m "Initial commit"
    
  3. Link your repo between local & remote, then push to remote:

    $ git remote add origin [email protected]:<your_username>/Foo.git
    $ git push -u origin master
    

If you get a conflict then, pull from remote repo before push:

$ git pull

Upvotes: 1

Related Questions