title: net-scp waiting until time-out in capistrano's git:wrapper task
body: <p>I'm using Rails 3.2 and Ruby 2.1 with capistrano 3.0.1 deployement, and I'm facing issue with the git:check task :</p>
  
  <pre><code>douglas@bilbo:/var/www/odpf$ cap production git:check --trace
  ** Invoke production (first_time)
  ** Execute production
  ** Invoke load:defaults (first_time)
  ** Execute load:defaults
  [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
  ** Invoke bundler:map_bins (first_time)
  ** Execute bundler:map_bins
  ** Invoke git:check (first_time)
  ** Invoke git:wrapper (first_time)
  ** Execute git:wrapper
   INFO [01658950] Running /usr/bin/env mkdir -p /tmp/odpf/ on phisa-odpf-vd.vserver.nimag.net
  DEBUG [01658950] Command: /usr/bin/env mkdir -p /tmp/odpf/
  DEBUG [01658950]    === Lancement de /home/rvm_admin/.bashrc ===
   INFO [01658950] Finished in 0.629 seconds with exit status 0 (successful).
  cap aborted!
  === Lancement de /home/rvm_admin/.bashrc ===
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-scp-1.1.2/lib/net/scp.rb:392:in `await_response_state'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-scp-1.1.2/lib/net/scp.rb:363:in `block (3 levels) in start_command'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:311:in `call'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:311:in `process'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:222:in `block in preprocess'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:222:in `each'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:222:in `preprocess'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:205:in `process'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:269:in `wait'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/net-scp-1.1.2/lib/net/scp.rb:279:in `upload!'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:81:in `upload!'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/capistrano-3.0.1/lib/capistrano/tasks/git.rake:14:in `block (3 levels) in &lt;top (required)&gt;'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
  /home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
  Tasks: TOP =&gt; git:check =&gt; git:wrapper
  </code></pre>
  
  <p>The last line of code that the ruby debugger gave is about <code>await_response_state</code>, so I guess that ssh-kit doesn't get an answer and timed out. I can't figure why though ???</p>
  
  <p>I dug into <strong><code>/home/douglas/.rvm/gems/ruby-2.1.0@rails3/gems/capistrano-3.0.1/lib/capistrano/tasks/git.rake</code></strong> and found this at the stucked line 13 :</p>
  
  <pre><code>  upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
  </code></pre>
  
  <p>The parameters for this command are like chinese for me and I can't dig deeper.</p>
  
  <p>If anybody could help me on this issue (either with capistrano, or with bash &amp; ruby for the parameters) I would be gratefull.</p>
  
  <p>Thanks </p>