0

所以我试图通过 capistrano 部署一个应用程序,但尽管尝试了几种格式来引用 pem 文件,但它反复询问我的密码。pem 文件位于 rails 项目的根目录,名为 highlandsapptestdeploy。这是我的代码:另外,我不确定我的服务器引用是否正确?

set :application, "highlandsfacebookart"
set :repository,  "https://onenoc@bitbucket.org/onenoc/highlands-coffee-art-app.git"

set :user, 'deploy'
set :use_sudo, false
set :deploy_to, "/var/www/#{application}#"
set :deploy_via, :remote_cache
ssh_options[:keys] = %w(/highlandsapptestdeploy/highlandsfbkey.pem)


# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "ec2-54-200-24-60.us-west-2.compute.amazonaws.com"                          # Your HTTP server, Apache/etc
role :app, "ec2-54-200-24-60.us-west-2.compute.amazonaws.com"                          # This may be the same as your `Web` server
role :db,  "ec2-54-200-24-60.us-west-2.compute.amazonaws.com", :primary => true # This is where Rails migrations will run
role :db,  "ec2-54-200-24-60.us-west-2.compute.amazonaws.com"
4

2 回答 2

3

我感觉你的用户名不正确。你确定它是“部署”吗?

于 2013-09-26T06:24:21.673 回答
1

你还需要ssh-agent在你的机器上工作。一旦代理正常工作,您应该能够ssh在不提供密码或密码短语的情况下进入机器。然后您需要告诉 Capistrano 转发来自代理的身份验证。

ssh_options[:forward_agent] => true
于 2013-09-26T02:39:24.867 回答