0

我正在尝试将应用程序部署到亚马逊网络服务器。我让Git安装并运行(我已经成功地推但是,当我尝试做帽部署我收到拒绝“权限”Ruby on Rails AWS Cap部署权限被拒绝

这里的错误:

servers: ["22.229.78.34"] 
    [[email protected]] executing command 
    ** [22.229.78.34 :: out] Cloning into '/home/ubuntu/liquid_admin/releases /20130703153332'... 
    ** [22.229.78.34 :: out] Permission denied (publickey). 
    ** fatal: The remote end hung up unexpectedly 
    command finished in 779ms 
    *** [deploy:update_code] rolling back 

而这里的部署文件:

require 'bundler/capistrano' 
set :user, 'ubuntu' 
set :domain, '[email protected]' 
set :applicationdir, "~/liquid_admin" 

set :scm, 'git' 
set :repository, "ssh://[email protected]/~/liquid_admin.git" 
set :git_enable_submodules, 1 # if you have vendored rails 
set :branch, 'master' 
set :git_shallow_clone, 1 
set :scm_verbose, true 
set :application, "liquid.radio" 

# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent  guess based on known version control directory names 

或者:accurevbzrcvsdarcsgitmercurialperforcesubversionnone

role :web, "[email protected]"       # Your HTTP server, Apache/etc 
role :app, "[email protected]"       # This may be the same as your ` Web` server 
role :db, "[email protected]", :primary => true # This is where Rails migrations will run 

set :deploy_to, "~/liquid_admin" 
set :deploy_via, :export 

default_run_options[:pty] = true 

namespace :deploy do 
task :start do ; end 
task :stop do ; end 
task :restart, :roles => :app, :except => { :no_release => true } do 

可能是一个愚蠢的时问,但我想知道如果我需要已经Ruby和Rails安装了这个工作。无论如何,我现在要这样做......但我只是想知道(不知道帽子是否适合你)。

但是除此之外,它会失败吗?

再次git设置和运行良好。推工作得很好。 SSH工作正常。我应该注意的另一件事是,我试着运行[email protected]并运行22.229.78.34。我这样做的Ubuntu的方式,因为这通常是唯一的方式亚马逊将接受连接。任何帮助,将不胜感激。

回答

1
** [22.229.78.34 :: out] Permission denied (publickey). 
** fatal: The remote end hung up unexpectedly 

看起来您需要通过ssh连接转发您的Github ssh密钥Capistrano打开AWS实例。添加set :ssh_options, { :forward_agent => true }到你的deploy.rb

+0

好吧,它看起来好像还行......然后它打我“捆绑未找到”[54.229.78.34 :: out]解决三角洲:100%(21/21),完成。 ** [out :: 54.229.78.34] sh:1: ** [out :: 54.229.78.34] bundle:找不到 –

+0

Nevermind ...在另一篇文章中找到了解决方案... VICTORY! –