Ok I solved the scp issue and got a bit far away but it is still failing 
get:check capistrano's task.
I managed to test scp command solo on the bash and it was failing. That was 
weird because it was working at some point in the past.
I searched in google and found the solution.

The cause of all my problem was coming from a bug of scp that DEVELOPPERS 
REFUSE TO FIX !!! I can't believe it ! I spent weeks of search because of 
this....

Here it is an inquiry made by somone else on the same problem : 
http://unix.stackexchange.com/questions/18231/scp-fails-without-error
And here it is the *SCP bug dating from year 2000 !!!* 
https://bugzilla.redhat.com/show_bug.cgi?id=20527


To solve it, I commented my "echo commands" from my .bahsrc file :

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# These are my echo command checks
#echo '=== Execution of /home/rvm_admin/.bashrc ==='
#[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
#shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'#echo 
"Agent forwarding ? => SSH_AUTH_SOCK = $SSH_AUTH_SOCK"
#echo '=== End of echo commands by Douglas ==='

# If not running interactively, don't do anything
case $- in
 *i*) ;;
 *) return;;
esac

...

And scp get successfully executed :

douglas@bilbo:/var/www/odpf$ cap production git:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
 INFO [bfe4332e] Running /usr/bin/env mkdir -p /tmp/odpf/ on myserver.net
DEBUG [bfe4332e] Command: /usr/bin/env mkdir -p /tmp/odpf/
 INFO [bfe4332e] Finished in 0.555 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/odpf/git-ssh.sh 0.0%
 INFO Uploading /tmp/odpf/git-ssh.sh 100.0%
 INFO [8763305f] Running /usr/bin/env chmod +x /tmp/odpf/git-ssh.sh on 
myserver.net
DEBUG [8763305f] Command: /usr/bin/env chmod +x /tmp/odpf/git-ssh.sh
 INFO [8763305f] Finished in 0.072 seconds with exit status 0 (successful).
** Execute git:check
DEBUG [bfda396c] Running /usr/bin/env git ls-remote [email protected]:mycount/
myrepo.git on myserver.net
DEBUG [bfda396c] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/odpf/git-ssh.sh 
/usr/bin/env git ls-remote [email protected]:mycount/myrepo.git )
DEBUG [bfda396c] Permission denied (publickey).
DEBUG [bfda396c] fatal: The remote end hung up unexpectedly
DEBUG [bfda396c] Finished in 1.135 seconds with exit status 128 (failed).


I think this is link to agent-forwarding SSH_AUTH_SOCK environnement 
variable not exported/set during capistrano's task.
Could it be because capistrano use some ssh option that prevent 
environnement variables ?
I dont know... I'm searching

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/fb7dde38-c599-451a-82b6-751aa0eaf181%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to