【问题标题】:Heroku - Fatal error when pushing to a git repositoryHeroku - 推送到 git 存储库时出现致命错误
【发布时间】:2013-10-07 02:56:41
【问题描述】:

我使用 Git Bash 将我的文件推送到 git 存储库。当我这样做时很好:

heroku login
git add .

但我试过这个:

`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 correct access rights 
and the repository exists.

我尝试了以下命令,但它们不起作用:

heroku keys:clear
heroku keys:add

我是 Git 和 Heroku 的新手,我们将不胜感激。

【问题讨论】:

  • 命令git remote -v输出什么?

标签: windows git heroku push


【解决方案1】:

您还没有创建 Heroku 应用程序。

您需要运行 heroku create 命令,该命令将创建一个 Heroku 应用程序,并添加一个名为 heroku 的 git 远程,它指向您新创建的应用程序。之后git push heroku master 应该可以正常工作。

【讨论】:

  • 如果您不创建新应用程序会怎样。我尝试向我克隆的现有存储库添加一个遥控器(我没有使用 heroku clone 克隆它):heroku git:remote -a cars-staging ...但仍然没有运气。仍然说它找不到回购
  • Heroku create 对您来说是一款很棒的新应用。您所要做的就是忽略旧的应用程序。
猜你喜欢
  • 2011-04-29
  • 1970-01-01
  • 2012-06-12
  • 2013-03-28
  • 2012-04-15
  • 2020-01-29
  • 1970-01-01
  • 2016-04-07
  • 1970-01-01
相关资源
最近更新 更多