输入repo密码后,cap部署挂起

时间:2016-05-04 15:55:14

标签: ruby-on-rails capistrano bitbucket

这是Rails 4.2.0 app的deploy.rb。从3.5.0笔记本电脑部署的Win10上限:

lock '3.5.0'

set :application, 'webportal'
set :repo_url, 'git@bitbucket.org:myname/webportal.git'   
set :branch, '4.2.0.t'      
set :deploy_to, '/ebs/www/webportal'    
set :scm, :git
set :user, "ubuntu"
set :user_sudo, false    
set :deploy_via, :remote_cache
set :ssh_options,     { forward_agent: true, paranoid: false, user: fetch(:user), keys: %w(~/.ssh/mykey.pem) }   
set :pty, true    
set :keep_releases, 5    
set :rvm_ruby_string, '2.2.4'
set :rvm_type, :user 
server "IP", roles: [:web, :app, :db], :primary => true    
set :keep_assets, 2

namespace :deploy do

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do         
    end
  end
end

这是在输入repo密码后停止部署的地方:

00:12 git:set_current_revision
      01 echo "13a75f3754433384a1ec0878db11adff3e0b5216" >> REVISION
    ✔ 01 ubuntu@IP 0.392s
00:12 deploy:symlink:linked_dirs
      01 mkdir -p /ebs/www/webportal/releases/20160504145314/public
    ✔ 01 ubuntu@IP 0.364s
      02 rm -rf /ebs/www/webportal/releases/20160504145314/public/assets
    ✔ 02 ubuntu@IP 0.472s
      03 ln -s /ebs/www/webportal/shared/public/assets /ebs/www/webportal/releases/20160504145314/public/assets
    ✔ 03 ubuntu@IP 0.346s
00:14 bundler:install
      01 ~/.rvm/bin/rvm default do bundle install --path /ebs/www/webportal/shared/bundle --without development test --deployment --quiet
      01 Password for 'https://mainlogin@bitbucket.org':
(Backtrace restricted to imported tasks)
cap aborted!

服务器的公钥已添加到bitbucket中。以下是部署Win10笔记本电脑的输出ssh -T

$ ssh -T git@bitbucket.org
logged in as mylogin.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

以下是git:check

$ cap production git:check
rvm 1.27.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
ruby-2.2.4
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
00:00 git:wrapper 
      01 mkdir -p /tmp/webportal/ 
    ✔ 01 ubuntu@IP 0.387s
      Uploading /tmp/webportal/git-ssh.sh 100.0%
      02 chmod +rx /tmp/webportal/git-ssh.sh 
    ✔ 02 ubuntu@IP 0.341s
00:01 git:check 
      01 git ls-remote --heads git@bitbucket.org:dev1/webportal.git 
      01 Error reading response length from authentication socket.
      01
      01 13a75f3754433384a1ec0878db11adff3e0b5216
      01
      01 refs/heads/4.2.0.t
      01
      01 eae5f2921ff7f146da0faea73b5258bed0bc8f18
      01
      01 refs/heads/master
      01
    ✔ 01 ubuntu@IP 3.142s

为什么部署过程会停止响应输入的密码?

0 个答案:

没有答案