首页 > 解决方案 > 运行 git heroku push master 时出现致命错误

问题描述

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

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.

标签: githerokufatal-error

解决方案


也许,如此处所示,您在推送之前还需要一个命令:

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

推荐阅读