【问题标题】:git push heroku master fails in herokugit push heroku master 在heroku中失败
【发布时间】:2013-09-05 19:54:47
【问题描述】:

我从 heroku 开始,并且正在关注 heroku 入门教程。我在 Windows 7 上并使用 Windows powershell 作为命令行。

我使用的命令是

git clone git://github.com/heroku/ruby-sample.git
cd ruby-sample
heroku login
heroku create
git push heroku master
heroku open

该目录被克隆,在heroku login 之后,我在命令行中得到了Authentication successful.。在heroku create之后我得到了

Creating immense-lowlands-8694... done, stack is cedar
http://immense-lowlands-8694.herokuapp.com/ | git@heroku.com:immense-lowlands-8694.git
Git remote heroku added

所以该应用程序已添加到我的 heroku 帐户中。但是git push heroku master 有问题。我得到了

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

到目前为止我已经尝试过什么

  • This question 说过要添加密钥,但它适用于 Linux,不适用于 Windows 7。
  • 我使用了heroku keys,它说我的电子邮件 ID 有一个密钥。
  • 正如this answer 所说,我尝试了heroku keys:add 并得到了

这个

Found existing public key: C:/Users/Aseem/.ssh/github_rsa.pub
Uploading SSH public key C:/Users/Aseem/.ssh/github_rsa.pub... done

但在那之后错误并没有结束。

  • 我试过 this answer 所说的,但 ssh-keygen 没有被识别,所以我猜它是用于 linux 的。
  • 我尝试使用 heroku keys:remove KEY_NAME 删除,然后使用 heroku login 重新登录,但也没有解决错误。

我可以做些什么来解决这个问题?

【问题讨论】:

  • 使用ssh-keygen创建一个新密钥这个答案会帮助你stackoverflow.com/questions/15000662/…
  • @uDaY 我需要单独安装ssh-keygen 吗?我已经做到了,但在 windows powershell 中无法识别。
  • 您可以使用现有的 github 密钥,但我不推荐。尝试为 heroku 创建一组新的密钥。 ssh-keygen 在 Windows 中带有 MSysGit 包。

标签: windows heroku


【解决方案1】:

安装 MSysGit 而不是 git。将C:\Program Files(x86)\Git\bin 目录添加到PATH 变量中,然后执行this answer 所说的解决问题。

【讨论】:

  • Windows 上的 Heroku 工具带似乎还有一些不足之处。
猜你喜欢
  • 1970-01-01
  • 2013-03-21
  • 1970-01-01
  • 2021-05-19
  • 1970-01-01
  • 1970-01-01
  • 2011-05-23
  • 2018-07-31
  • 2015-08-12
相关资源
最近更新 更多