Can't push to git hub

不打扰是莪最后的温柔 提交于 2019-12-11 03:29:24

问题


I just completed Chapter One of the Ruby on Rails Tutorial by Hartl. Posted about one minor hitch previously. Now I started Chapter Two. I swear I did everything by the book, but now when I try:

git push -u origin master 

I get the following messages after entering my passphrase:

ERROR: repository not found fatal: could not read from remote repository Please make sure you have the correct access rights and that the repository exists.

When I down loaded heroku tools I think it installed a second version of Ruby on my machine. In any case I now have two version listed under All Programs. Could this have screwed thing up? The two versions are Ruby 1.9.2-p290 and 1.9.3-p327. Also when I open the command prompt using 1.9.2 there is a weird thing at the top before I do anything:

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

This is then followed by the normal prompt on the next line. I'm wondering if the use of my public keys have some how gotten screwed up.

Any help would be appreciated.


回答1:


You should add a new git remote.

check https://help.github.com/articles/adding-a-remote




回答2:


So i had problems with windows and multiple versions of ruby too. I would recommend deinstalling all versions and only installing one ruby version. But thats not related to your Github problem i guess.

Switch via the commandline to your app folder and checkout:

git remote -v

it shows you what is the remote location for you app. And 5 bucks that its screwd up. You can remove the path by:

git remote rm origin

or if its only on heroku:

git remote rm heroku

and after that add the correct remote path again. Example:

git remote add origin git@github.com:foo/bar.git

That hopefuly fix it.

And keep in mind if you want to push to heroku use:

git push heroku master


来源:https://stackoverflow.com/questions/13965622/cant-push-to-git-hub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!