将代码部署到Heroku(问题?)
https://devcenter.heroku.com/articles/python
当我尝试通过 $ git push heroku master
来部署我的代码时,出现了一个错误:
Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
接下来,我通过 $ heroku keys:add
成功添加了那个IP地址的RSA主机密钥,但我仍然遇到这个错误:
Found existing public key: /Users/opalkale/.ssh/github_rsa.pub
Uploading SSH public key /Users/opalkale/.ssh/github_rsa.pub... done
(venv)Opal-Kales-MacBook-Pro:helloflask opalkale$ git push heroku master
Permission denied (publickey).
我到底哪里做错了呢...?
1 个回答
1
把你的 id_rsa.pub SSH 密钥添加到你的 Heroku 账户上,网址是:https://dashboard.heroku.com/account
同时要确保你对应的私钥也已经添加到你的身份中
$ ssh-add ~/.ssh/id_rsa
比如:
$ ssh-add ~/.ssh/github_rsa