当我尝试着将我的应用推向Heroku时,我得到了这样的回应:

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我尝试过“heroku keys:add”,但仍然得到相同的结果。 我已经有一个ssh密钥为我的GitHub帐户。


当前回答

也许值得检查一下。git文件夹中的配置文件。如果heroku参数缺失,那么你将得到这个错误heroku参数

[remote "heroku"]
    url = git@heroku.com:`[Your heroku app].git
    fetch = +refs/heads/*:refs/remotes/heroku/*

.git文件夹应该在你在heroku中创建的应用的本地计算机文件目录中。c:\ users \ you \你的app.git

希望这能有所帮助

其他回答

英雄吉尔:遥控器

我遇到了同样的错误,而且是一个新手犯的错误:我输入的Heroku是大写的“H”,而不是小写的。

我知道这当然不是每个遇到这种错误的人的解决方案,但在我的情况下是这样的。

我必须以管理员权限运行Windows命令提示符

我也有同样的问题,但后来我发现我忘记在部署应用程序之前创建应用程序。在终端试试下面的步骤。

heroku login
heroku create

我只是在学习heroku,经常忘记步骤,所以我写了一篇关于它的文章。您可以在这里找到它:https://medium.com/@saurav.panthee/ deploy-flask-app-heroku - under3 - minuts-2ec1c0bc403a

显示heroku访问的所有应用程序

heroku apps

并检查你的应用程序是否存在 然后

 execute heroku git:remote -a yourapp_exist