2
$ heroku keys:add
Found existing public key: C:/Users/Andre/.ssh/github_rsa.pub
Uploading SSH public key C:/Users/Andre/.ssh/github_rsa.pub... done
Andre@ANDREH /c/Unisinos/Desenvolvimento de Software/unidemico (master)
$ 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.

知道为什么我会收到此错误吗?我在 github_rsa.pub 文件中确实有一个公钥......也在https://dashboard.heroku.com/apps/XXXApp/settings我设置了我的公钥

请帮忙

4

2 回答 2

2

尝试运行以下命令来列出您的密钥链中当前的 ssh 密钥:

ssh-add -l

您应该看到如下内容:

2048 3c:a8:e1:...:f7 /Users/.../.ssh/github_rsa (RSA)

如果不这样做,则意味着您的密钥未加载。做:

ssh-add ~/.ssh/github_rsa

然后它应该工作

git push heroku master
于 2013-08-15T18:43:33.870 回答
0

Pierre-Louis Gottfrois 的评论帮助了我,我没有正确创建 id_rsa.pub,现在它工作正常!

于 2013-08-17T21:15:05.690 回答