Hi Rafael,

thanks for your reply.

The repository still is on oag-server.

I tried running the command in a ssh shell on the server.
This is, what happened on the first attempt:

git clone  o...@oag-server:git/wvz.git
/home/oag/oag-server/shared/cached-copy
Initialized empty Git repository in
/home/oag/oag-server/shared/cached-copy/.git/
The authenticity of host 'oag-server (127.0.1.1)' can't be established.
RSA key fingerprint is 52:65:2e:b3:d8:43:55:75:9e:bc:02:4e:f9:90:b6:c0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'oag-server' (RSA) to the list of known
hosts.
Enter passphrase for key '/home/oag/.ssh/id_dsa':
remote: Counting objects: 293, done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 293 (delta 109), rremote: eused 293 (delta 109)
Receiving objects: 100% (293/293), 137.41 KiB, done.
Resolving deltas: 100% (109/109), done.

It works, but required an extra input. The reason for the need of
this extra input was, that I never before used the ssh key. That
means, that the key is missing in .ssh/known_hosts and ssh requests
a special verification.

Removing the results of this run and rerunning the command in the
ssh shell has different results:

git clone  o...@oag-server:git/wvz.git \
  /home/oag/oag-server/shared/cached-copy
Initialized empty Git repository in
/home/oag/oag-server/shared/cached-copy/.git/
Enter passphrase for key '/home/oag/.ssh/id_dsa':
remote: Counting objects: 293, done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 293 (delta 109), rremote: eused 293 (delta 109)
Receiving objects: 100% (293/293), 137.41 KiB, done.
Resolving deltas: 100% (109/109), done.

OK. And now the bad end of the story: Running

   cap deploy:migrations

from my workstation still fails with a slightly different result as
before:

cap deploy:migrations
  * executing `deploy:migrations'
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote o...@oag-server:git/wvz.git master"
o...@oag-server's password:
  * executing "if [ -d /home/oag/oag-server/shared/cached-copy ];
then cd /home/oag/oag-server/shared/cached-copy && git fetch  origin
&& git reset  --hard aeba71d5b7ce45e24cdb2bf052260fbc235b3a66 && git
clean  -d -x -f; else git clone  o...@oag-server:git/wvz.git
/home/oag/oag-server/shared/cached-copy && cd
/home/oag/oag-server/shared/cached-copy && git checkout  -b deploy
aeba71d5b7ce45e24cdb2bf052260fbc235b3a66; fi"
    servers: ["oag-server"]
Password:
    [oag-server] executing command
 ** [oag-server :: err] Permission denied, please try again.
 ** [oag-server :: err] Permission denied, please try again.
 ** [oag-server :: err] Permission denied (publickey,password).
 ** [oag-server :: err] fatal: The remote end hung up unexpectedly
    command finished
failed: "sh -c 'if [ -d /home/oag/oag-server/shared/cached-copy ];
then cd /home/oag/oag-server/shared/cached-copy && git fetch  origin
&& git reset  --hard aeba71d5b7ce45e24cdb2bf052260fbc235b3a66 && git
clean  -d -x -f; else git clone  o...@oag-server:git/wvz.git
/home/oag/oag-server/shared/cached-copy && cd
/home/oag/oag-server/shared/cached-copy && git checkout  -b deploy
aeba71d5b7ce45e24cdb2bf052260fbc235b3a66; fi'" on oag-server

--------------

User oag has the same password as the public key, so I really do not
understand, what's going on on my server.

My next attempt was, to run the full sh -c '...' in a ssh shell on
the server:

sh -c 'if [ -d /home/oag/oag-server/shared/cached-copy ]; then cd
/home/oag/oag-server/shared/cached-copy && git fetch  origin && git
reset  --hard 5408b548c6e5100fdef401e1e0b8d463de221abc && git clean
 -d -x -f; else git clone  o...@oag-server:git/wvz.git
/home/oag/oag-server/shared/cached-copy && cd
/home/oag/oag-server/shared/cached-copy && git checkout  -b deploy
5408b548c6e5100fdef401e1e0b8d463de221abc; fi'
Initialized empty Git repository in
/home/oag/oag-server/shared/cached-copy/.git/
Enter passphrase for key '/home/oag/.ssh/id_dsa':
remote: Counting objects: 294, done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 294 (delta 109), reused 294 (delta 109)
Receiving objects: 100% (294/294), 137.75 KiB, done.
Resolving deltas: 100% (109/109), done.
Switched to a new branch "deploy"

----------------

It works! Why this?

Is there any possibilty to get a full log of the actions, capistrano
executes on the server?

Regards, wasserfloh

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to