2014-02-21 78 views
7

我在Heroku仪表板中将我的应用名称从“my-app-staging”更改为“my-app-staging-new”。现在我不能再对它进行更改 - git会抛出下列错误:Heroku应用名称更改后Git推送失败

! No such app as my-app-staging.

fatal: Could not read from remote repository.

如何解决该问题?

+0

[重命名的heroku应用程序可能来自网站的重复,现在找不到](http://stackoverflow.com/questions/7615807/renamed-heroku-app-from-website-now-its-not-found) – Yarin

回答

20

你需要改变你的git remote。

如果你做git remote -v你应该看到heroku列出。

它看起来是这样的:

heroku [email protected]:my-app-staging.git (fetch)
heroku [email protected]:my-app-staging.git (push)

删除远程...

git remote rm heroku

...然后添加新的

git remote add heroku [email protected]:my-app-staging-new.git