Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Heroku应用程序名称更改后Git推送失败_Git_Heroku - Fatal编程技术网

Heroku应用程序名称更改后Git推送失败

Heroku应用程序名称更改后Git推送失败,git,heroku,Git,Heroku,我在Heroku仪表板中将我的应用程序名称从“我的应用程序暂存”更改为“我的应用程序暂存新”。现在,我无法再将更改推送到它-git抛出以下错误: !!没有像我的应用登台这样的应用 致命:无法从远程存储库读取 如何解决此问题?您需要更改git remote 如果您使用git remote-v,您应该会看到列出的heroku 它将看起来像: herokugit@github.com:my-app-staging.git(fetch) herokugit@github.com:my-app-stagi

我在Heroku仪表板中将我的应用程序名称从“我的应用程序暂存”更改为“我的应用程序暂存新”。现在,我无法再将更改推送到它-git抛出以下错误:

!!没有像我的应用登台这样的应用

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


如何解决此问题?

您需要更改git remote

如果您使用git remote-v,您应该会看到列出的heroku

它将看起来像:

herokugit@github.com:my-app-staging.git(fetch)
herokugit@github.com:my-app-staging.git(推送)

删除那个遥控器

git远程rm heroku

…然后添加新的


git远程添加herokugit@heroku.com:my app staging new.git

首先删除旧的遥控器

$git远程rm heroku

然后添加新的:

$heroku git:remote-一个新名称

git remote rm heroku
移除旧的遥控器。然后

git remote add heroku git@heroku.com:new-app-name.git
要添加新的遥控器。最后

heroku keys:add

设置一个公共ssh密钥。

最后一个命令可能与git remote add heroku重复