Capistrano在同一台服务器上部署gitosis和应用服务器?

时间:2012-11-19 14:23:10

标签: ruby-on-rails capistrano gitosis

我在同一个VPS服务器上构建gitosis服务器和stage服务器。在我的本地计算机或舞台服务器中从gitosis克隆存储库运行良好。但是本地机器中的cap deploy总是问我输入密码如下,我不知道密码是什么,我尝试每个密码都不起作用。

我知道可以用deploy_via: copy复制本地存储库,但我更喜欢为其他项目构建一个gitosis服务器。

有什么想法吗?感谢。

环境

gitosis和舞台服务器ip:106.187.xxx.xxx(出于安全原因掩盖一些号码)

登录

  * executing `deploy'
    triggering before callbacks for `deploy'
  * executing `check:revision'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote gitosis@106.187.xxx.xxx:foo_project.git master"
    command finished in 1105ms
  * executing "if [ -d /home/deployer/apps/railsapp/shared/cached-copy ]; then cd /home/deployer/apps/railsapp/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 07827de89355c5366c4511ee22fdd9c68a31b0be && git clean -q -d -x -f; else git clone -q gitosis@106.187.xxx.xxx:foo_project.git /home/deployer/apps/railsapp/shared/cached-copy && cd /home/deployer/apps/railsapp/shared/cached-copy && git checkout -q -b deploy 07827de89355c5366c4511ee22fdd9c68a31b0be; fi"
    servers: ["106.187.xxx.xxx"]
    [106.187.xxx.xxx] executing command
 ** [106.187.xxx.xxx :: out] Password:
Password: 
 ** [106.187.xxx.xxx :: out]
 ** [106.187.xxx.xxx :: out] Password:
Password: 
 ** [106.187.xxx.xxx :: out]
 ** [106.187.xxx.xxx :: out] Password:
Password: 
 ** [106.187.xxx.xxx :: out]
 ** [106.187.xxx.xxx :: out] Permission denied (publickey,keyboard-interactive).
 ** [106.187.xxx.xxx :: out] fatal: The remote end hung up unexpectedly

deploy.rb

server "106.187.xxx.xxx", :web, :app, :db, primary: true

set :application, "railsapp"
set :user, "deployer"
set :local_user, "joshchang"
set :deploy_to, "/home/#{user}/apps/#{application}"

set :use_sudo, false
set :rails_env, "stage"

set :scm, "git"
set :repository, "gitosis@106.187.xxx.xxx:foo_project.git"
set :deploy_via, :remote_cache
set :branch, "master"

default_run_options[:pty] = true
ssh_options[:forward_agent] = true

0 个答案:

没有答案