Repository navigation
Add check for :known_hosts support in net-ssh - #358
Merged
Merged
Conversation
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 |
Member
|
Also: a CHANGELOG entry would be much appreciated! |
Contributor
Author
Snap, I always forgot those. (by the way I'm @byroot) |
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). |
Member
|
Excellent work. Thanks! 🙇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should fix #357
Disclaimer: I haven't had the time to test it properly yet.