renamed heroku app from website, now it's not found

独自空忆成欢 提交于 2019-12-29 10:04:24

问题


After renaming my heroku app from the heroku website, whenever I cd to it's directory in a terminal and run any heroku command, I get App not found. Does anybody know of a way to remedy this?


回答1:


Try to update the git remote for the app:

git remote rm heroku
git remote add heroku git@heroku.com:yourappname.git



回答2:


The Answer by James Ward is also correct, alternatively try doing this:

1). open a terminal

2). Go to your_app_directory/.git/config

3). Once you open the config file then edit as follows:

Change

url = git@heroku.com:old_app_name.git

to

url = git@heroku.com:new_app_name.git

Obviously substituting your apps old name to its new name. Hope it helps Also checkout this link renaming from cli - heroku




回答3:


git remote rm heroku
heroku git:remote -a newname



回答4:


From the Heroku docs...

If you rename from the website ... [your app] will need to be updated manually:

git remote rm heroku
heroku git:remote -a newname



回答5:


There is another way, you can fix it by renaming the app to the original name via web.

To find out the old name use heroku command line:

> heroku rename newname

which will spit out the old name. Use the old name to rename the app via web. You can check if renaming success by running

> heroku info

Once done you can rename to the preferred name by using

> heroku rename preferredname



回答6:


James Ward's solution didn't work for me. I had to enter my git url in a different format:

git remote rm heroku
git remote add heroku https://git.heroku.com/appname.git


来源:https://stackoverflow.com/questions/7615807/renamed-heroku-app-from-website-now-its-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!