【问题标题】:git push heroku master - FAILgit push heroku master - 失败
【发布时间】:2013-03-21 03:26:38
【问题描述】:

我向 Github 添加了一个 SSH 密钥,用于提交我的代码。一切都很完美。然后我尝试使用以下步骤提交到 Heroku 以使我的应用程序上线:

[omrails]$heroku keys:add
# Found the following SSH public keys:
# 1) github_rsa.pub 2) id_rsa.pub

# Which would you like to use with your Heroku account? 2 
# Uploading SSH public key /Users/jackburum/.ssh/id_rsa.pub... done

[omrails]$heroku create

# Creating calm-earth-1147... done, stack is cedar
# http://calm-earth-1147.herokuapp.com/ |
# git@heroku.com:calm-earth-1147.git

[omrails]$git push heroku master

# !  Your key with fingerprint *************** is not authorized to access omrails.
# fatal: The remote end hung up unexpectedly

然后我尝试清除 Heroku 密钥 (heroku keys:clear) 并再次添加密钥...无济于事。我还在 Github 中更改了我的 SSH 密钥,看看这是否是问题所在。我可以做些什么不同的事情?

【问题讨论】:

  • 检查 git remote -v 的输出 - 检查 heroku 原点是否指向 git@heroku.com:calm-earth-1147.git 我怀疑它可能不是。

标签: ruby-on-rails heroku git-push


【解决方案1】:

现在我猜你的“heroku”来源指向了一个不正确的 Heroku 应用程序。要解决此问题,请执行以下操作。

  1. 删除 heroku 原点 - git remote rm heroku
  2. 读取了指向平静地球 1147 应用程序的 heroku 原点 - git remote add heroku git@heroku.com: calm-earth-1147.git
  3. 确认添加正确,git remote -v

【讨论】:

    【解决方案2】:

    我也为使用 SSH 密钥而苦恼,特别是因为我在 Heroku 上的多个帐户。然后我发现了这个https://github.com/ddollar/heroku-accounts,它可以帮助您在 Heroku 上使用多个帐户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-19
      • 2013-09-05
      • 1970-01-01
      • 1970-01-01
      • 2018-07-31
      • 2015-08-12
      • 2011-05-23
      相关资源
      最近更新 更多