我正在学习/创建我的第一个Capistrano部署。
然而,在我得到任何工作甚至测试之前,我遇到了问题。
当我运行任何命令时,我都会提到错误。
我可以手动ssh到终端。
这里有完整的调试输出:
cap production deploy:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke deploy:check (first_time)
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
00:00 git:wrapper
01 mkdir -p /tmp
D, [2017-01-04T11:18:09.551896 #25214] DEBUG -- net.ssh.transport.session[119d510]: establishing connection to gate.paas.datacenter.fi:3022
D, [2017-01-04T11:18:09.589776 #25214] DEBUG -- net.ssh.transport.session[119d510]: connection established
I, [2017-01-04T11:18:09.590718 #25214] INFO -- net.ssh.transport.server_version[119cd54]: negotiating protocol version
D, [2017-01-04T11:18:09.591139 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: local is `SSH-2.0-Ruby/Net::SSH_4.0.0 x86_64-linux-gnu'
D, [2017-01-04T11:18:09.604129 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: remote is `SSH-2.0-JSSHProxy'
I, [2017-01-04T11:18:09.605222 #25214] INFO -- net.ssh.transport.algorithms[119c520]: sending KEXINIT
D, [2017-01-04T11:18:09.605828 #25214] DEBUG -- socket[119d1dc]: queueing packet nr 0 type 20 len 1140
D, [2017-01-04T11:18:09.606537 #25214] DEBUG -- socket[119d1dc]: sent 1144 bytes
D, [2017-01-04T11:18:09.606977 #25214] DEBUG -- socket[119d1dc]: read 400 bytes
D, [2017-01-04T11:18:09.607461 #25214] DEBUG -- socket[119d1dc]: received packet nr 0 type 20 len 396
I, [2017-01-04T11:18:09.607901 #25214] INFO -- net.ssh.transport.algorithms[119c520]: got KEXINIT from server
I, [2017-01-04T11:18:09.608375 #25214] INFO -- net.ssh.transport.algorithms[119c520]: negotiating algorithms
cap aborted!
Net::SSH::Exception: could not settle on compression_client algorithm
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:345:in `negotiate'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:325:in `negotiate_algorithms'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:200:in `proceed!'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:149:in `accept_kexinit'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `loop'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `poll_message'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:225:in `block in wait'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `loop'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `wait'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:88:in `initialize'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `new'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `start'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `call'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `with'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:155:in `with_ssh'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:108:in `execute_command'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `tap'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:74:in `execute'
/var/lib/gems/2.3.0/gems/capistrano-3.7.1/lib/capistrano/scm/tasks/git.rake:8:in `block (3 levels) in eval_rakefile'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `run'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:check => git:check => git:wrapper
答案 0 :(得分:0)
尝试ssh -vvv your-ip
,查看日志。使用ssh-options
中的compression_client,如下所示:
set :ssh_options, {
forward_agent: true,
compression_client: "zlib"
}