Friday, May 23, 2014

fixing "no such app as" error in heroku deployment after application rename

I did few changes in my toy project and pushed it to heroku with

git push heroku master
but got this error:
!  No such app as myOldApplicationName.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
I googled a bit to see that this is due to my application rename in heroku website. The previous name was "myOldApplicationName". Then I searched my .git directory to see if there are references to the old application name. I found it under "config".
[remote "heroku"]
 url = git@heroku.myOldApplicationName.git
Edit it with your new application to fix the issue.
[remote "heroku"]
 url =