我正在关注 ruby.railstutorial。我运行命令“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.
我在我的 Rails 应用程序“/Users/lexi87/rails_projects/first_app”内。有什么解决办法吗?
避免此类错误的最佳方法是使用一对公钥/私钥对,而不是为 heroku 使用额外的密钥。这样你(或你的系统)就不会选择错误的密钥来登录heroku。
如果您收到此错误,则说明您做错了什么。检查这个网站:https://devcenter.heroku.com/articles/keys https://devcenter.heroku.com/articles/keys
如果出现此错误,最好的方法是删除不必要的密钥并仅使用一个。
如果您的系统上需要多个密钥对,您可以为heroku 设置一个密钥。这是通过以下命令完成的:
heroku keys:add
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)