Deploy with Capistrano Win32 -> Linux


#1

Im trying to deploy with capistrano from win32 to Linux but no success.

I’ve been installed: cwRsync to ssh

I ran
rake remote:exec ACTION=setup --trace

and get:

Anyone knows how to get capistrano log ssh comunication?

Any idea?

Thanks

rake aborted!
End of file reached
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/version-negot
iator.rb:51:in readline' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/version-negot iator.rb:51:innegotiate’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/version-negot
iator.rb:50:in loop' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/version-negot iator.rb:50:innegotiate’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/session.rb:95
:in initialize' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1 21:innew’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1
21:in register_services' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1 15:incall’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:42
:in call' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40 :insynchronize’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40
:in call' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/service-point.rb:122:in
instance’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/container.rb:308:in
[]' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/connection/services.rb: 60:inregister_services’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/connection/services.rb:
58:in call' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:42 :incall’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40
:in synchronize' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40 :incall’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/service-point.rb:122:in
instance' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/container.rb:308:in[]’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/service/process/service
s.rb:53:in `register_services’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/service/process/service


#2

You can enable SSH logging by adding the following line to your
deploy.rb:

ssh_options[:debug] = :verbose

From the stacktrace, I’m guessing you may be trying to connect to an
SSHv1 server (Net::SSH is SSHv2 only), or you are trying to connect
to a non-SSH service (like telnet). Just guessing, though.

  • Jamis

#3

Jamis B. wrote:

You can enable SSH logging by adding the following line to your
deploy.rb:

ssh_options[:debug] = :verbose

From the stacktrace, I’m guessing you may be trying to connect to an
SSHv1 server (Net::SSH is SSHv2 only), or you are trying to connect
to a non-SSH service (like telnet). Just guessing, though.

  • Jamis

Thanks Jamis!

I can ssh from prompt with

ssh -2 removed_email_address@domain.invalid
-2 indicate uses v2

Seems dont like
ssh_options[:debug] = :verbose

:frowning:

rake aborted!
invalid option(s) to Net::SSH::Transport::Session: [:debug]
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/session.rb:80
:in initialize' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1 21:innew’
c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1
21:in register_services' c:/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.8/lib/net/ssh/transport/services.rb:1 15:incall’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:42
:in call' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40 :insynchronize’
c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40
:in call' c:/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/needle/service-point.rb:122:in
instance’


#4

On Apr 8, 2006, at 8:41 PM, Pedro V. wrote:

Jamis:

the correct sentence was:
ssh_options[:verbose] = :debug

Good catch, sorry about that.

anyway still same error :frowning:

Yah, turning debugging on won’t fix the error, but I was hoping it
might give a bit more info about where it is dying. Feel free to send
me the output attached to an email to removed_email_address@domain.invalid, and I’ll
take a look at it.

  • Jamis

#5

Jamis:

the correct sentence was:
ssh_options[:verbose] = :debug

anyway still same error :frowning:


#6

Pedro V. wrote:

Jamis B. wrote:

On Apr 8, 2006, at 8:41 PM, Pedro V. wrote:

Jamis:

the correct sentence was:
ssh_options[:verbose] = :debug

Good catch, sorry about that.

anyway still same error :frowning:

Yah, turning debugging on won’t fix the error, but I was hoping it
might give a bit more info about where it is dying. Feel free to send
me the output attached to an email to removed_email_address@domain.invalid, and I’ll
take a look at it.

  • Jamis

Thank you Jamis

I cannot get debugging ssh from capistrano with option turned on. That’s
what I mean.

I wrote an ssh client based on example ssh-client from net-ssh-1.0.8 and
does not work first time, then I modified including password and works.

Im confused with keys, paths and passwords.
I used ssh-keygen -d to generate the private and public key
but reading net-ssh docs found puttyagent then generate a new key with
puttygen.exe and put it in pageant.exe service.
Which key I have to specify in deploy.rb
ssh_options[:keys] = %w(/path/to/my/key /path/to/another/key)

I think that specifying the keys will work there is a problem with keys
negotiation fails, dont prompt for password.

P

Its working now. Here some hacks to get working…

It seems that .merge(config.ssh_options) in ssh.rb do something bad with
options

I have been removed any ssh_options on my deploy.rb and set the password
set :password, “password” and is working now!!

It seems that hostbased authentication did not work for me.

thanks


#7

Jamis B. wrote:

On Apr 8, 2006, at 8:41 PM, Pedro V. wrote:

Jamis:

the correct sentence was:
ssh_options[:verbose] = :debug

Good catch, sorry about that.

anyway still same error :frowning:

Yah, turning debugging on won’t fix the error, but I was hoping it
might give a bit more info about where it is dying. Feel free to send
me the output attached to an email to removed_email_address@domain.invalid, and I’ll
take a look at it.

  • Jamis

Thank you Jamis

I cannot get debugging ssh from capistrano with option turned on. That’s
what I mean.

I wrote an ssh client based on example ssh-client from net-ssh-1.0.8 and
does not work first time, then I modified including password and works.

Im confused with keys, paths and passwords.
I used ssh-keygen -d to generate the private and public key
but reading net-ssh docs found puttyagent then generate a new key with
puttygen.exe and put it in pageant.exe service.
Which key I have to specify in deploy.rb
ssh_options[:keys] = %w(/path/to/my/key /path/to/another/key)

I think that specifying the keys will work there is a problem with keys
negotiation fails, dont prompt for password.

P