Skip to content

Unable to make :password work ('no implicit conversion of Hash into String') #62

Description

@DannyBen

I must be missing something obvious, but I am unable to make rye connect to my local vagrant box that is password protected (not SSH key).

This is what I tried:

puts "Works, but prompts for pass"
rbox = Rye::Box.new
p rbox.pwd.to_s

puts "Fails"
rbox = Rye::Box.new user:user, password:password
p rbox.pwd.to_s

puts "Fails"
rbox = Rye::Box.new user:user, password:password, password_prompt:false
p rbox.pwd.to_s

This is the output trace I get

/home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `initialize': no implicit conversion of Hash into String (TypeError)
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `open'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `block in initialize'
from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:125:in `timeout'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:67:in `initialize'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/box.rb:669:in `connect'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/box.rb:773:in `run_command'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/cmd.rb:69:in `pwd'
from ./test.rb:12:in `<main>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions