【发布时间】:2014-03-27 23:44:38
【问题描述】:
我正在尝试部署一个应用程序,当我运行 cap deploy 时:检查一切看起来都很好,但是当我尝试部署它时,我收到以下错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/app/releases/20140327233712; true"
servers: ["IP"]
[IP] executing command
command finished in 676ms
Command git ls-remote git@bitbucket.org:user/app.git staging returned status code pid 5458 exit 128
我已经在我的服务器中生成了密钥 (ssh-keygen -t rsa -C "lorem.."),然后我在 bitbucket 中添加了这个密钥,但我的权限仍然存在问题。
编辑:
在 deploy.rb 文件中,我使用 AWS 在创建新实例时生成的密钥并将其保存到本地计算机:ssh_options[:keys] = ["/Users/user/Documents/app. pem"] 然后我在我的服务器中生成了密钥并将其添加到 Bitbucktet ("home/ubuntu/.ssh/id_rsa.pub"),所以我认为我需要添加我本地的密钥("app.pem" ) 机器到 Bitbucket,但是当我尝试这样做时,我在 Bitbucket 中得到错误:无效的 SSH 密钥 (ssh-keygen)。
【问题讨论】:
标签: ruby-on-rails amazon-web-services capistrano bitbucket