Scripting rubyforge sftp interaction

Hi,

Instead of using a static sftp batchfile, I’d like to
use Ruby to motor around in rubyforge. However, I can’t
even get a session connected, e.g.,

require ‘rubygems’
require ‘net/sftp’

Net::SFTP.start(‘rubyforge.org’,‘kleb’,:verbose=>:debug ) do |sftp|
#…
end

fails with an error like,

/usr/local/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/transport/algorithm-negotiator.rb:78:
in prepare_preferred_algorithms': undefined methodssh_type’ for
nil:NilClass (NoMethodError)

I tried adding a :host_key=>‘ssh-rsa’ or ‘ssh-dss’ but even
after setting :verbose=>:debug and reading the source, I can’t
make any sense out of the errors.

Has anyone managed Ruby-powered sftp interaction with rubyforge?

Is the http://tony.aiu.to/sa/cvs/cvssh.pl (restricted shell) preventing
it?

(I’m trying to set group file permissions in the rdoc hierarchy so
others on our team can rake publish_docs.)

Thanks,

Bil K.
http://nasarb.rubyforge.org

P.S. I had to scp ~/.ssh/id_rsa.pub rubyforge.org:.ssh/authorized_keys2
to get a sftp batch file to work. Otherwise, I was met with the dreaded
“Received message too long” error.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs