git 推送到 Heroku 失败 - 没有这样的应用程序致命

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34379130/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:38:53  来源:igfitidea点击:

Pushing To Heroku Fails - No Such App Fatal

githeroku

提问by Vikram

Git push onto heroku is pointing to a non-existing git repository.

git push 到 heroku 指向一个不存在的 git 存储库。

git.heroku.com/secure-reef-1722.gitthis is the repository created when we ran heroku createcommand.

git.heroku.com/secure-reef-1722.git这是我们运行heroku create命令时创建的存储库。

But when we run a 'push' command ($ git push heroku master), it says

但是当我们运行“推送”命令($ git push heroku master)时,它说

remote: ! No such app as boiling-inlet-6957. fatal: repository 'https://git.heroku.com/boiling-inlet-6957.git/' not found

偏僻的: !没有诸如boiling-inlet-6957 之类的应用程序。致命:未找到存储库“ https://git.heroku.com/boiling-inlet-6957.git/

Also we are not able to see the new repository when we run $ git remote -v

当我们运行$ git remote -v时,我们也无法看到新的存储库

heroku  https://git.heroku.com/boiling-inlet-6957.git (fetch)
heroku  https://git.heroku.com/boiling-inlet-6957.git (push)
origin  [email protected]:coderz$/toy_app.git (fetch)
origin  [email protected]:coderz$/toy_app.git (push)
heroku  https://git.heroku.com/boiling-inlet-6957.git (fetch)
heroku  https://git.heroku.com/boiling-inlet-6957.git (push)
origin  [email protected]:coderz$/toy_app.git (fetch)
origin  [email protected]:coderz$/toy_app.git (push)

Now we are unable to push files to the new heroku git repository (git.heroku.com/secure-reef-1722.git)

现在我们无法将文件推送到新的 heroku git 存储库 (git.heroku.com/secure-reef-1722.git)

Kindly help us out. Thanks in advance.

请帮助我们。提前致谢。

Complete sequence of commands

完整的命令序列

coderz$:~/workspace/toy_app (master) $ heroku create
Creating secure-reef-1722... done, stack is cedar-14
https://secure-reef-1722.herokuapp.com/ | https://git.heroku.com/secure-reef-1722.git
coderz$:~/workspace/toy_app (master) $ git push heroku master
remote: !       No such app as boiling-inlet-6957.
fatal: repository 'https://git.heroku.com/boiling-inlet-6957.git/' not found
coderz$:~/workspace/toy_app (master) $ git remote -v
heroku  https://git.heroku.com/boiling-inlet-6957.git (fetch)
heroku  https://git.heroku.com/boiling-inlet-6957.git (push)
origin  [email protected]:coderz$/toy_app.git (fetch)
origin  [email protected]:coderz$/toy_app.git (push)
coderz$:~/workspace/toy_app (master) $ 

回答by CodeWizard

Try to re-add the remote url.

尝试重新添加远程 url。

// Check for the current url 
git remote -v

// remove remote url
git remote rm heroku

// re-add the remote url
git remote add heroku [email protected]:boiling-inlet-6957.git

enter image description here

在此处输入图片说明

回答by nourza

This command solve mine

这个命令解决我的

git remote rm heroku
git remote add heroku https://git.heroku.com/app-name.git

回答by benjamin

You should probably accept @codeWizard's answer, as it looks like your quick fix.
The official documentation is a flawless walkthrough, that avoids your trouble:

您可能应该接受@codeWizard 的回答,因为它看起来像是您的快速解决方案。
官方文档是一个完美的演练,可以避免您的麻烦:

https://devcenter.heroku.com/articles/git

https://devcenter.heroku.com/articles/git

回答by zschleien

git remote -v
heroku  https://git.heroku.com/falling-wind-1624.git (fetch)
heroku  https://git.heroku.com/falling-wind-1624.git (push)


 heroku git:remote -a falling-wind-1624