Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku push app problem

Tags:

git

heroku

I installed Heroku and set up an account, but for some reason whenever I try to push the app to the site, I get this error.

$ git push heroku master
!  No such app as first_app
fatal: The remote end hung up unexpectedly

I have checked to see that heroku sees the git

$ git remote -v
heroku  [email protected]:first_app.git (fetch)
heroku  [email protected]:first_app.git (push)

how do I get heroku to recognize my git file?

like image 312
Paul Avatar asked Jun 22 '11 22:06

Paul


4 Answers

It seems that you have renamed your application.

If you have renamed you application just follow the instructions here:

http://devcenter.heroku.com/articles/renaming-apps#updating-git-remotes

Follow: Updating Git remotes part if you updated your application through the Heroku Web Interface!

like image 129
glarkou Avatar answered Oct 19 '22 15:10

glarkou


If you are using the CLI to rename an app from inside the Git checkout directory, your remote will be updated automatically. If you rename from the website or have other checkouts, such as those belonging to other developers, these will need to be updated manually:

$ git remote rm heroku
$ heroku git:remote -a newname
like image 30
actraub Avatar answered Oct 19 '22 13:10

actraub


Here is a step-by-step for first timers to rename your app in git to match it's new heroku name. It also includes slightly different terminal inputs than others have noted here.

  1. open terminal and navigate using

    • cd .. to get back to the main directory and

      cd *dev_folder*/*app_folder* to navigate into the proper folder

    • dev_folder and app_folder will be the actual names of the folders where you file your applications

    • your shell prompt in terminal will now be

      user_name@computer_name:~/dev_folder/app_folder$

  2. remove the current heroku association by typing after the $ prompt:

    git remote rm heroku

  3. open your browser and log into heroku

  4. on heroku click on "MyApps" in the top navigation bar

  5. on heroku click on the application you want to associate with your local directory

  6. on heroku click the "Settings" icon that looks like gears

  7. on heroku scroll down the settings page until you find the "Info" section

  8. on heroku copy your Git URL, [email protected]:yourappname.git, from the Info section

  9. go back to your terminal

  10. add your new heroku app name by typing in terminal after the $ prompt:

    git remote add heroku (paste your git url)

    your full prompt will look like:

    user_name@computer_name:~/dev_folder/app_folder$ git remote add heroku [email protected]:*yourappname*.git

  11. all done, try to push
like image 9
knappen Avatar answered Oct 19 '22 13:10

knappen


It's a common rename problem.

you should go back to heroku and rename your app to the old name

and run the following command to give it a new name from console:

heroku apps:rename new_app_name
like image 3
Gal Bracha Avatar answered Oct 19 '22 15:10

Gal Bracha