From 84f78cd9f93e27b11323cfec28b1de2d574518ad Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Fri, 1 Sep 2023 15:11:12 -0400 Subject: [PATCH 1/2] fix: do not hardcode Net::SSH auth_methods --- lib/kamal/configuration/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kamal/configuration/ssh.rb b/lib/kamal/configuration/ssh.rb index c98fca716..57a740b70 100644 --- a/lib/kamal/configuration/ssh.rb +++ b/lib/kamal/configuration/ssh.rb @@ -18,7 +18,7 @@ def proxy end def options - { user: user, proxy: proxy, auth_methods: [ "publickey" ], logger: logger, keepalive: true, keepalive_interval: 30 }.compact + { user: user, proxy: proxy, logger: logger, keepalive: true, keepalive_interval: 30 }.compact end def to_h From 9a539ffc8696ddd0948107efff4c4cedaa83b0ba Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Wed, 6 Sep 2023 10:58:40 -0400 Subject: [PATCH 2/2] chore: update tests to remove hardcoded ssh auth method --- test/configuration_test.rb | 2 +- test/integration/main_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 425407e57..5ff1ba4c5 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -258,7 +258,7 @@ class ConfigurationTest < ActiveSupport::TestCase :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=\"redis://x/y\""], - :ssh_options=>{ :user=>"root", :auth_methods=>["publickey"], log_level: :fatal, keepalive: true, keepalive_interval: 30 }, + :ssh_options=>{ :user=>"root", log_level: :fatal, keepalive: true, keepalive_interval: 30 }, :sshkit=>{}, :volume_args=>["--volume", "/local/path:/container/path"], :builder=>{}, diff --git a/test/integration/main_test.rb b/test/integration/main_test.rb index 59d73e8f6..6a4333ed7 100644 --- a/test/integration/main_test.rb +++ b/test/integration/main_test.rb @@ -51,7 +51,7 @@ class MainTest < IntegrationTest assert_equal "app-#{version}", config[:service_with_version] assert_equal [], config[:env_args] assert_equal [], config[:volume_args] - assert_equal({ user: "root", auth_methods: [ "publickey" ], keepalive: true, keepalive_interval: 30, log_level: :fatal }, config[:ssh_options]) + assert_equal({ user: "root", keepalive: true, keepalive_interval: 30, log_level: :fatal }, config[:ssh_options]) assert_equal({ "multiarch" => false, "args" => { "COMMIT_SHA" => version } }, config[:builder]) assert_equal [ "--log-opt", "max-size=\"10m\"" ], config[:logging] assert_equal({ "path" => "/up", "port" => 3000, "max_attempts" => 7, "cmd" => "wget -qO- http://localhost > /dev/null" }, config[:healthcheck])