0

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?
4

3 回答 3

3

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

于 2013-08-19T11:11:31.820 回答
1

这个错误:

git-receive-pack not found

意味着服务器不知道您的回购。这通常意味着您忘记创建它,或者您用来推送的 url 有一些拼写错误(注意 Caps!)。

于 2013-08-19T11:16:03.863 回答
0

尝试按照此处的故障排除步骤操作:https ://help.github.com/articles/https-cloning-errors 。

我建议设置 SSH 密钥并改用 SSH 克隆 URL:https ://help.github.com/articles/which-remote-url-should-i-use

于 2013-08-19T15:06:55.870 回答