为什么卡皮斯特拉诺表现得像这样?

时间:2011-01-05 03:01:37

标签: ruby-on-rails ruby deployment capistrano

我的部署问题

我运行了cap部署并获得了此

 Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
** [174.143.150.79 :: out] Permission denied (publickey).
** fatal: The remote end hung up unexpectedly
command finished
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deploy/transprint/releases/20110105034446; true"
servers: ["174.143.150.79"]
[174.143.150.79] executing command

这是我的deploy.rb

set :application, "transprint"
set :domain, "174.149.150.79"
set :user, "deploy"
set :use_sudo, false
set :scm, :git
set :deploy_via, :remote_cache

set :app_path, "production"
set :rails_env, 'production'


set :repository,  "git@github.com:myname/something.git"
set :scm_username, 'deploy'

set :deploy_to, "/home/deploy/#{application}"

role :app, domain
role :web, domain
role :db,  domain, :primary => true

请帮助

1 个答案:

答案 0 :(得分:11)

Capistrano正在向您的服务器发送命令,将其作为“部署”用户运行,其中一个命令正在尝试连接到github。请查看:

http://help.github.com/troubleshooting-ssh/ (检查“SSH配置”和“权限被拒绝(公钥)”)

部分

http://help.github.com/linux-key-setup/

基本上要确保你有:

  • github帐户
  • 安装在174.143.150.79上的SSH密钥
  • 您的github帐户个人资料中的公共SSH密钥设置