Heroku + Git公钥

时间:2013-08-15 18:26:20

标签: git heroku github-for-windows

$ 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我设置了我的公钥

请帮助

2 个答案:

答案 0 :(得分:2)

尝试运行以下内容列出当前密钥链中的ssh密钥:

ssh-add -l

你应该看到这样的事情:

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

如果不这样做,则表示您的密钥未加载。做:

ssh-add ~/.ssh/github_rsa

然后它应该工作

git push heroku master

答案 1 :(得分:0)

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