knguyeniii
knguyeniii

Reputation: 1

Trouble pushing new repo in GitHub

I am following that Rails tutorial from Hart. Right now I am having trouble creating a repo and pushing it to GitHub. Assuming that I have done the prerequisite steps properly...this is where I am stuck:

So I am trying to create my repo here:

Kennys-MacBook-Pro:first_app kennynguyen$ git remote add github https://github.com/knguyeniii/first_app.git

And then push my Rails files to GitHub:

Kennys-MacBook-Pro:first_app kennynguyen$ git push -u github master

And this is the error I get:

fatal: https://github.com/knguyeniii/first_app.git/info/refs?service=git-receive-pack not found: did you run git update-server-info on the server?

And because I don't know what else to type...:

Kennys-MacBook-Pro:first_app kennynguyen$ git update-server-info

Try another push:

Kennys-MacBook-Pro:first_app kennynguyen$ git push -u github master

Same error:

fatal: https://github.com/knguyeniii/first_app.git/info/refs?service=git-receive-pack not found: did you run git update-server-info on the server?

Upvotes: 0

Views: 349

Answers (3)

nvunguyen
nvunguyen

Reputation: 223

Try to follow the troubleshooting steps here: https://help.github.com/articles/https-cloning-errors.

And I would suggest setting up SSH keys and use the SSH clone URL instead: https://help.github.com/articles/which-remote-url-should-i-use

Upvotes: 0

bluehallu
bluehallu

Reputation: 10275

This error:

git-receive-pack not found

means the server doesn't know about your repo. This usually means you forgot to create it, or that the url you're using to push has some typo (care with Caps!).

Upvotes: 1

Nevik Rehnel
Nevik Rehnel

Reputation: 51945

You need to create the repo on Github first!

Github will not let you create repos by pushing to them, so you need to create on in their WebUI before pushing data to it (this is how it is with most hosted solutions).

Upvotes: 3

Related Questions