[英]Can't push on heroku
我刚刚在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.
我该怎么做才能解决它?
这是因为没有名为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
其中示例是您的heroku应用程序的名称。
在你能做之前
$ git push heroku master
你需要按照Heroku入门中给出的步骤设置heroku。 一旦你设置了heroku,登录,创建你的应用程序。
验证是否添加了git remote
$ git remote -v
它应该列出一个名为heroku
的遥控器。 如果它确实那么错误heroku' does not appear to be a git repository
将会消失
如果您已按照教程中的步骤操作,则只需再次登录:
cmd "heroke login"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.