diff --git a/lib/kamal/cli/build.rb b/lib/kamal/cli/build.rb index 379fd12a1..3b64e89be 100644 --- a/lib/kamal/cli/build.rb +++ b/lib/kamal/cli/build.rb @@ -112,9 +112,11 @@ def verify_local_dependencies def connect_to_remote_host(remote_host) remote_uri = URI.parse(remote_host) - options = { user: remote_uri.user, port: remote_uri.port }.compact - on(remote_uri.host, options) do - execute "true" + if remote_uri.scheme == "ssh" + options = { user: remote_uri.user, port: remote_uri.port }.compact + on(remote_uri.host, options) do + execute "true" + end end end end