亚马逊AWS,帽部署:检查失败 [英] Amazon AWS, cap deploy:check fails

查看:186
本文介绍了亚马逊AWS,帽部署:检查失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装部署到AWS EC2实例,使用Capistrano的。为了测试,我使用的是

I'm trying to setup deployment to an AWS EC2 instance, using capistrano. In order to test, I'm using

cap testing deploy:check

但Capistrano的失败,:

but Capistrano fails with:

    triggering load callbacks
  * 2013-03-12 15:41:27 executing `testing'
    triggering start callbacks for `deploy:check'
  * 2013-03-12 15:41:27 executing `multistage:ensure'
  * 2013-03-12 15:41:27 executing `deploy:check'
  * executing "test -d /......./releases"
    servers: ["ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com"]
    connection failed for: ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
    (NoMethodError: undefined method `each' for "publickey":String)

我用我的.pem文件进行连接,并且deploy.rb脚本如下所示:

I'm using my .pem file to connect, and the deploy.rb script looks as follows:

set :stages, %w(production testing)
set :default_stage, 'testing'
require 'capistrano/ext/multistage'

set :application, 'app_name'
set :user, 'the_user'
set :group, 'the_group'

set :scm, :git
set :repository,  "git@github.com:......./#{application}.git"
set :deploy_to, '/......./'
set :deploy_via, :remote_cache

# Authentication setup
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:auth_methods] = 'publickey'
ssh_options[:keys] = ['~/........pem']

任何想法,为什么会这样?

Any idea why this is happening?

推荐答案

尝试把你的公钥服务器上。

Try putting your public key on the server.

和删除

ssh_options [:auth_methods] ='公钥'

ssh_options[:auth_methods] = 'publickey'

ssh_options [:密钥] = ['〜/ ........ PEM']

ssh_options[:keys] = ['~/........pem']

这应该工作

这篇关于亚马逊AWS,帽部署:检查失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆