Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to capistrano and trying to run script to deploy source codes to QA server which connected with VPN. Tested script in my 'Git bash' shell in windows machine. I have no problems at connecting github as tested below.

$ ssh -T git@github.com
Hi jkjunguser! You've successfully authenticated, but GitHub does not provide sh
ell access.

VPN connection with client's network is established using Cisco ANyConnect v2.5. Tested SSH connection from my local shell to target server and was successful. Also tested github connection from the target server and had no issues.

However when I ran deploy script I got "Error reading response length from authentication socket." error as below.

$ cap qa deploy
  * ?[32m2013-05-30 13:53:16 executing `qa'?[0m
  * ?[32m2013-05-30 13:53:16 executing `deploy'?[0m
  * ?[32m2013-05-30 13:53:16 executing `deploy:update'?[0m
 ** transaction: start
  * ?[32m2013-05-30 13:53:16 executing `deploy:update_code'?[0m
    updating the cached checkout on all servers
    ?[33mexecuting locally: "git ls-remote git@github.com:cleanShot/client-ph
ase2.git master"?[0m
    ?[2;37mcommand finished in 7293ms?[0m
  * ?[33mexecuting "if [ -d /home/web/qa.client.com/shared/cached-copy ]; then
cd /home/web/qa.client.com/shared/cached-copy && git fetch -q origin && git fet
ch --tags -q origin && git reset -q --hard b0f37d41f5d8aa5716986725d1c72142536af
8d2 && git clean -q -d -x -f; else git clone -q -b master git@github.com:cleanShot
/client-phase2.git /home/web/qa.client.com/shared/cached-copy && cd /home/
web/qa.client.com/shared/cached-copy && git checkout -q -b deploy b0f37d41f5d8a
a5716986725d1c72142536af8d2; fi"?[0m
    servers: ["10.33.XX.XXX"]
Password:
    [10.33.XX.XXX] executing command
 ** [10.33.XX.XXX :: err] Error reading response length from authentication sock
et.
 ** [10.33.XX.XXX :: err] ERROR: Repository not found.
 ** [10.33.XX.XXX :: err] fatal: The remote end hung up unexpectedly
    ?[2;37mcommand finished in 2217ms?[0m
*** [?[34mdeploy:update_code?[0m] ?[34mrolling back?[0m
  * ?[33mexecuting "rm -rf /home/web/qa.client.com/releases/20130530015346; tru
e"?[0m
    servers: ["10.33.XX.XXX"]
    [10.33.XX.XXX] executing command
    ?[2;37mcommand finished in 522ms?[0m
failed: "sh -c 'if [ -d /home/web/qa.client.com/shared/cached-copy ]; then cd /
home/web/qa.client.com/shared/cached-copy && git fetch -q origin && git fetch -
-tags -q origin && git reset -q --hard b0f37d41f5d8aa5716986725d1c72142536af8d2
&& git clean -q -d -x -f; else git clone -q -b master git@github.com:company/
client-phase2.git /home/web/qa.client.com/shared/cached-copy && cd /home/web/
qa.client.com/shared/cached-copy && git checkout -q -b deploy b0f37d41f5d8aa571
6986725d1c72142536af8d2; fi'" on 10.33.XX.XXX 

The deploy script used is below. [deploy.rb]

set :repository, "git@github.com:cleanShot/client-phase2.git"
set :scm, :git
set :branch, fetch(:branch, "master")

set :use_sudo, false

set :normalize_asset_timestamps, false

ssh_options[:forward_agent] = true

task :qa do

    set :user, 'web'
    set :application, "qa.basspro.com"
    set :deploy_to, "/home/web/#{application}"
    set :deploy_via, :remote_cache
    set :current_path, "#{deploy_to}/current"
    set :releases_path, "#{deploy_to}/releases/"
    set :shared_path, "#{deploy_to}/shared/"
    role :web, "10.33.88.101"

end
after 'deploy:update', :update_permission

If there is any cure for this "Error reading response length from authentication socket." error that would be great. Please give me any helpful advice. I am happy to try any suggestion.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.