【问题标题】:Fatal error when I run git heroku push master运行 git heroku push master 时出现致命错误
【发布时间】:2019-08-01 08:52:36
【问题描述】:

我已经运行了以下代码,一切都很顺利:

git init
git add .
git commit —m 'name'
heroku create

但是当我运行这段代码时:

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.

【问题讨论】:

  • 请先学习一些 Git 基础知识。当你运行这些命令时,你知道你在做什么吗?
  • 虽然我没有使用 Heroku,但我想heroku create 里面没有像git remote add 这样的东西。那么git push heroku master中“heroku”的引用为空。

标签: git heroku fatal-error


【解决方案1】:

确保在 git push heroku master 之前执行“heroku create”

【讨论】:

    【解决方案2】:

    也许,作为illustrated here,您在推送之前还需要一个命令:

    cd /path/to/repo
    heroku git:remote -a yourapp
    

    【讨论】:

      猜你喜欢
      • 2021-03-30
      • 1970-01-01
      • 2014-10-26
      • 1970-01-01
      • 2014-02-01
      • 1970-01-01
      • 2013-02-03
      • 2016-12-26
      • 1970-01-01
      相关资源
      最近更新 更多