Forum: Rails deployment Capistrano => can't create tunnel error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Maarten P. (Guest)
on 2007-07-09 21:37
Hello,

I'm trying to use capistrano deployment on my mediatemple DV server.
Unfortunately I always get the same "can't create tunnel" error when
doing "cap deploy". I've been searching for a solution but it's really
driving me nuts. With tortoise (svn+ssh) I'm able to connect to my
repository without any problems. Can somebody help me?


D:\webroot\mezza_svn>cap deploy
  * executing task deploy
  * executing task update
 ** transaction: start
  * executing task update_code
  * querying latest revision...
svn: Can't create tunnel: The system cannot find the file specified.
*** [update_code] transaction: rollback
  * [update_code] rolling back
  * executing "rm -rf /u/apps/mezza/releases/20070709160041"
    servers: ["www.mezza-interieur.be"]
Password: xxx

 ** [update_code] exception while rolling back:
Net::SSH::AuthenticationFailed,
Owner
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb
:24:in `latest_revision': Could not determine latest revision
(RuntimeError)
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/conf
iguration.rb:62:in `initialize'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/conf
iguration.rb:89:in `call'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/conf
iguration.rb:89:in `[]'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/conf
iguration.rb:236:in `method_missing'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/
subversion.rb:63:in `checkout'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/reci
pes/standard.rb:80:in `load'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/acto
r.rb:159:in `instance_eval'
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/acto
r.rb:159:in `update_code'
         ... 13 levels...
        from
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.
rb:12:in `execute!'
        from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
        from c:/ruby/bin/cap:16:in `load'
        from c:/ruby/bin/cap:16
Jamis B. (Guest)
on 2007-07-09 21:45
(Received via mailing list)
Do you have a command-line SSH client installed, such as OpenSSH?

- Jamis
Maarten P. (Guest)
on 2007-07-09 21:51
Jamis B. wrote:
> Do you have a command-line SSH client installed, such as OpenSSH?
>
> - Jamis

yes, I'm working with putty. I guess capistrano is trying to connect to
my repository from my local computer.
Jamis B. (Guest)
on 2007-07-09 21:55
(Received via mailing list)
You might want to check out this article:

  http://www.woodwardweb.com/java/000155.html

It's not cap-specific, but the advice it gives might be applicable,
since the problem is the same.

- Jamis
Andrew S. (Guest)
on 2007-07-09 22:03
(Received via mailing list)
This is a known problem with putty. One solution is to use cygwin. There
is
also (or used to be) a web page out there somewhere that explained how
to
configure putty and server so this would work, but I can't find it right
now.

On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
--
Andrew S. * http://semprebon.blogspot.com/
Maarten P. (Guest)
on 2007-07-09 22:19
Andrew S. wrote:
> This is a known problem with putty. One solution is to use cygwin. There
> is
> also (or used to be) a web page out there somewhere that explained how
> to
> configure putty and server so this would work, but I can't find it right
> now.
>
> On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>> >
>>
>
>
> --
> --
> Andrew S. * http://semprebon.blogspot.com/


Ok, I tried several things. Changing the ssh var in the subversion
config file to:
ssh = C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -ssh -l
cpanelid

didn't work ;( ... I also tried adding an environment variable in
windows. Din't work eighter.

I'm gonna try cygwin. Hopefully that will work... :) Do I have to
uninstall putty first? If this is a common problem, why isn't there much
information about this? On my other PC I was able to use
capistrano/svn/putty without any problems.
Andrew S. (Guest)
on 2007-07-09 22:43
(Received via mailing list)
I don't think its that common - maybe its a particular version of putty
and
windows combined or something. I know I tried setting up the config file
with plink.exe and that didn't work, but I can't remember if I fixed it
or
not. I ended up going with cygwin.

On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
> > On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
>
> uninstall putty first? If this is a common problem, why isn't there much
>
--
--
Andrew S. * http://semprebon.blogspot.com/
Maarten P. (Guest)
on 2007-07-10 02:22
Andrew S. wrote:
> I don't think its that common - maybe its a particular version of putty
> and
> windows combined or something. I know I tried setting up the config file
> with plink.exe and that didn't work, but I can't remember if I fixed it
> or
> not. I ended up going with cygwin.
>
> On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
>> > On 7/9/07, Maarten P. <removed_email_address@domain.invalid> wrote:
>>
>> uninstall putty first? If this is a common problem, why isn't there much
>>
> --
> --
> Andrew S. * http://semprebon.blogspot.com/

YES!! .. I fixed it. I just restarted windows and then svn accepted the
plink ssh client :). jezus, took me hours.
Bradley Taylor (Guest)
on 2007-07-11 17:04
(Received via mailing list)
Hi:

Please review my windows recipe below as I have gotten excellent
results with it. Getting cap+svn+ssh to all work together on Windows
is tricky business. Some of the links might be old versions, but this
should point you in the right direction.

-----

Here's what I do to make a working windows environment.

- download and install ruby:
http://rubyforge.org/frs/download.php/12751/ruby185-21.exe

- open command prompt

- change to the bin directory in the ruby installation folder

- update ruby gems by running:
ruby gem update --system

- install gems (choose mswin32 1.0.1 when faced with mongrel version
choice)
gem install rails mongrel mongrel_cluster capistrano  --include-
dependencies

- close command prompt

- install svn
http://subversion.tigris.org/files/documents/15/35...

- install putty
http://the.earth.li/~sgtatham/putty/latest/x86/put...
<http://the.earth.li/%7Esgtatham/putty/latest/x86/putty-0.59-
installer.exe>
inside the putty directory you'll find putty, puttygen, and pageant.

- Add C:\Program Files\PuTTY to my path (right click my computer,
properties, advanced, environment variables, edit path system
variable)
- Edit C:\Documents and Settings\ YourUserName\Application
Data\Subversion\config in notepad
Under [tunnels] add:
ssh=plink
- Generate a key pair using Puttygen and save them.
- Paste the public key in to /home/deploy/.ssh/authorized_keys
mkdir ~/.ssh;chmod 700 ~/.ssh
cat > ~/.ssh/authorized_keys
<paste public key>
^D
chmod 600 ~/.ssh/authorized_keys
- Run Pageant
- Click on the icon in the taskbar and add the private key saved from
above.

------

At this point, everything should work without passwords (svn and
putty).

Good luck,
Bradley Taylor
http://railsmachine.com

On Jul 9, 1:37 pm, Maarten P. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.