Skip to content

Conversation

@casperisfine
Copy link
Contributor

Should fix #357

Disclaimer: I haven't had the time to test it properly yet.

@mattbrictson mattbrictson added this to the 1.11.1 milestone Jun 17, 2016
@mattbrictson
Copy link
Member

Given that CI passes, this code should be fine with the latest net-ssh. Can someone manually test that it does the right thing for 3.0.2 (which doesn't support :known_hosts)?

@mattbrictson
Copy link
Member

Also: a CHANGELOG entry would be much appreciated!

@casperisfine
Copy link
Contributor Author

Also: a CHANGELOG entry would be much appreciated!

Snap, I always forgot those. (by the way I'm @byroot)

@casperisfine
Copy link
Contributor Author

Ok, just tested it indeed solves the problem: https://gist.github.com/casperisfine/6810e2f1df54139f9c3f0cab84876b00

byroot@haunted-house:tmp:$ ruby ssh.rb 
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using net-ssh 3.0.2
Using bundler 1.12.3
Using net-scp 1.2.1
Using sshkit 1.11.0
  INFO [f61cef01] Running echo Hello on localhost
/Users/byroot/.gem/ruby/2.1.8/gems/net-ssh-3.0.2/lib/net/ssh.rb:197:in `start': invalid option(s): known_hosts (ArgumentError)
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/connection_pool.rb:59:in `call'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/connection_pool.rb:59:in `with'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/netssh.rb:149:in `with_ssh'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/netssh.rb:102:in `execute_command'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `tap'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
    from /Users/byroot/.gem/ruby/2.1.8/gems/sshkit-1.11.0/lib/sshkit/backends/abstract.rb:74:in `execute'
    from ssh.rb:22:in `<main>'
byroot@haunted-house:tmp:$ FIX=1 ruby ssh.rb 
Fetching git://github.com/shopify/sshkit.git
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using net-ssh 3.0.2
Using bundler 1.12.3
Using net-scp 1.2.1
Using sshkit 1.11.0 from git://github.com/shopify/sshkit.git (at handle-older-net-ssh@fd39260)
  INFO [5ffa3ef7] Running echo Hello on localhost
  INFO [5ffa3ef7] Finished in 0.255 seconds with exit status 0 (successful).

@mattbrictson
Copy link
Member

Excellent work. Thanks! 🙇

@mattbrictson mattbrictson merged commit 58c0bf0 into capistrano:master Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArgumentError: invalid option(s): known_hosts with net-ssh 3.0.2

3 participants