【问题标题】:How to push in heroku?如何推入heroku?
【发布时间】:2013-07-19 11:39:16
【问题描述】:

我克隆我的 repo 并更改一些内容并提交,

但是当我想像教程一样推送时:

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.

我确定我已经登录了,

那么我怎样才能正确推送我的 repo 并进行部署呢?

【问题讨论】:

  • 添加git remote -v的结果

标签: heroku github push


【解决方案1】:

来自 Git 参考 (http://gitref.org/remotes/#remote):

"为了让您不必每次想要与远程存储库同步时都使用它的完整 URL,Git 会为您感兴趣的每个远程存储库 URL 存储一个别名或昵称。您使用 git remote命令来管理您关心的远程存储库列表。”

您可以使用以下命令检查您的 git 存储库是否存在名为“heroku”的远程:

git remote -v

如果不存在,则需要添加后才能推送更新,如下:

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

其中 appname 应该是您的应用的名称。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-05
    • 2011-05-06
    • 2015-08-11
    • 1970-01-01
    • 1970-01-01
    • 2013-10-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多