【发布时间】: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 包。