Git push failing after Heroku app name change

て烟熏妆下的殇ゞ 提交于 2020-01-22 07:43:28

问题


I changed my app name from "my-app-staging" to "my-app-staging-new" in the Heroku dashboard. Now I can no longer push changes to it- git throws the following error:

! No such app as my-app-staging.

fatal: Could not read from remote repository.

How do I resolve that?


回答1:


You need to change your git remote.

If you do git remote -v you should see heroku listed.

It will look something like:

heroku git@github.com:my-app-staging.git (fetch)
heroku git@github.com:my-app-staging.git (push)

Delete that remote...

git remote rm heroku

...and then add the new one

git remote add heroku git@heroku.com:my-app-staging-new.git




回答2:


First Delete the Old remote

$ git remote rm heroku

Then Add the New One:

$ heroku git:remote -a newname



来源:https://stackoverflow.com/questions/21941015/git-push-failing-after-heroku-app-name-change

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