在Heroku应用程序名称更改后,Git推送失败 [英] Git push failing after Heroku app name change

查看:243
本文介绍了在Heroku应用程序名称更改后,Git推送失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku仪表板中将我的应用程序名称从my-app-staging更改为my-app-staging-new。现在我无法再对其进行更改 - git会抛出以下错误:




致命:无法从远程存储库读取数据。


如何解决这个问题?

解决方案

您需要更改您的git remote。



如果您执行 git remote -v ,您应该看到 heroku 列出。



它看起来像这样:



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

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

删除那个远程...

git remote rm heroku



...然后添加新的

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


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?

解决方案

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

这篇关于在Heroku应用程序名称更改后,Git推送失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆