bockdavidson
bockdavidson

Reputation: 2693

Ruby on Rails with Heroku: fatal: No configured push destination

I'm trying to deploy my app with Heroku, I'm using a tutorial from YouTube and I'm stuck on a part in the tutorial that tells you to enter in the terminal...

git push

after many other commands. When I did enter that command, I get the following message

fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>

I'm not sure what to put in, what do I have to put in?

In case you are wondering, I'm using the tutorial with the below link https://www.youtube.com/watch?v=mabGJ-vuABc

Upvotes: 0

Views: 191

Answers (2)

Mayur Shah
Mayur Shah

Reputation: 3449

For deploy your code following command use for push your code

git push heroku master

For your reference : tutorial

Follow all steps as in tutorial

Upvotes: 1

Leo Correa
Leo Correa

Reputation: 19789

What the error from the command is telling you is that there's no configured place to send your code to. What this means in the context of your problem is that you have not set up the URL in your repo for your Heroku app.

You can double check this by running git remote -v which should not contain an output or at least one that has a heroku url on it.

To fix this, go to your Heroku app instance and look for the .git url for the application. This provides an address to which you can push your application to.

Once you have that, you should be able to do the following

git remote add heroku https://git.heroku.com/<your-app-name>.git

This will create a remote called heroku which will point to the URL provided by your application to your application's repo in Heroku.

Then to push your code you can run:

git push heroku master

Upvotes: 0

Related Questions