2009/2/8 Jamis Buck <[email protected]>

>
> By default, Capistrano WILL load ~/.bashrc for each command (since
> about cap 2.4 or so). However, this default causes problems with
> interactive processes, like sudo or svn or other processes that may
> want to prompt for input. Thus, it is common for people to tell
> Capistrano to request a pty from the server, via
> default_run_options[:pty] = true. However, when cap requests a pty,
> the shell will not load the user's profile script.
>
> There's no good solution for this, except to NOT rely on your .bashrc
> (or similar) script. What kinds of things are you expecting to be set
> that way?
>
> You can mimic a pty-less SSH session like this:
>
>  ssh -T host.com "git clone -q /repos/equity/.git /tmp/test"
>
> Likewise, you can mimic SSH session with pty-allocation like this:
>
>  ssh -t host.com "git clone -q /repos/equity/.git /tmp/test"
>
> (pty-allocation is the default for openssh, but the difference there
> is that ssh requests an interactive user shell, and capistrano does
> not.)
>

BTW - This was exactly the problem.  That is when I ran the command using
"ssh -T" it failed as per the issues I was having. When I run it using "ssh
-t" (i.e. with pty-allocation) it worked perfectly.   So one learning for me
is that duplicating the commands on the remote server isn't the perfect way
to to fault isolation (i.e. as it was running in pty mode, not pty-less
mode).

PSS. One addition (slightly embarrassing) thing I noted that wouldn't have
helped is that there were times I was testing away from my main desk, so in
this case I was using wireless from my macbook.  You can probably see where
I'm going.  I did have at points the repository set to my MacBook address,
which obviously was changing when I went into wireless mode.  :(   doh!

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to