我正在尝试推送到 heroku,但出现权限被拒绝错误。我已经关注了这些位置的文章:
https://devcenter.heroku.com/articles/keys
部署 heroku 代码时权限被拒绝(公钥)。致命:远端意外挂断
但这些都行不通。
这是 shell 的输出,显示我正在尝试做的事情:
[root]# heroku keys
You have no keys.
[root]# heroku login
Enter your Heroku credentials.
Email: myemail@domain.com
Password (typing will be hidden):
Found the following SSH public keys:
1) github.pub
2) heroku.pub
Which would you like to use with your Heroku account? 2
Uploading SSH public key /root/.ssh/heroku.pub... done
Authentication successful.
[root]# git init
Reinitialized existing Git repository in /.git/
[root]# git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
编辑:这是针对 CentOS 服务器的。