简体   繁体   中英

Error pushing to Heroku after adding new domain


I recently added a new GoDaddy domain to my rails app. Everything works fine when I push to git but when I try to push to Heroku using:

$ git push heroku

I get the following error:

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository
Please make sure you have the correct access rights and the repository exists.

Is this problem occurring because I need to create another environment? The domain name for my GoDaddy website is listed under '$ heroku domains' but doesn't seem to be connected.

Any ideas would be helpful. TIA!

This issue is probably unrelated to godaddy. Try typing

git remote -v

this will give you a list of the remote repositories you have setup. If none are pointing to your app on heroku you'll need to set it up.

Refer to this on article from heroku dev center

https://devcenter.heroku.com/articles/git

EDIT

As i suspected your heroku remote is named "prod" not "heroku" try 'git push prod' that should work.

You might have to specify the branch in which case the command would be 'git push prod master'

EDIT2

It looks your are not yet authorized to push to heroku. The root problem can vary. I recommend starting with this article:

https://devcenter.heroku.com/articles/keys

Also check this SO article

git push heroku master Write failed: Connection reset by peer

As for your comment on answer below, its obvious that you should try

git push prod master instead of git push heroku

'heroku' and 'prod' it's just names of remote repositories. Heroku by default creates repos named accordingly - 'heroku'. As far as I know it could be changed to whatever you need

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM