2

我刚刚在 github 上克隆了我的一个存储库,我做了一些更改,我想将它发送到 heroku 应用程序。但是当我尝试运行时git push heroku master,我得到:

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.

我能做些什么来解决它?

4

3 回答 3

2

在你可以做之前

$ git push heroku master

您需要按照Heroku 入门中给出的步骤设置 heroku 。一旦你设置好heroku,登录,创建你的应用程序。

验证是否添加了 git remote

$ git remote -v

它应该列出一个名为heroku. 如果确实如此,那么错误heroku' does not appear to be a git repository将消失

于 2013-05-17T16:45:31.727 回答
2

这是因为没有名为 heroku 的遥控器。您可以通过键入来查看您的遥控器git remote -v。对于我的“示例”应用程序,我看到以下内容:

$ git remote -v
heroku git@heroku.com:example.git (fetch)
heroku git@heroku.com:example.git (push)

如果缺少,您可以使用以下命令添加遥控器:

git remote add heroku git@heroku.com:example.git

其中 example 是您的 heroku 应用程序的名称。

于 2013-05-17T16:45:40.093 回答
0

如果您已按照教程中的步骤操作,则只需再次登录:

cmd "heroke login"
于 2014-03-16T09:57:43.613 回答