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?
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!
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
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.
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$
remove the current heroku association by typing after the $ prompt:
git remote rm heroku
open your browser and log into heroku
on heroku click on "MyApps" in the top navigation bar
on heroku click on the application you want to associate with your local directory
on heroku click the "Settings" icon that looks like gears
on heroku scroll down the settings page until you find the "Info" section
on heroku copy your Git URL, [email protected]:yourappname.git, from the Info section
go back to your terminal
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With