kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Remote builder does not pass the username to SSHKit properly

Open hoblin opened this issue 6 months ago • 3 comments

I have the following build config:

builder:
  remote:
    arch: arm64
    host: ssh://[email protected]
  cache:
    type: gha

When i run build it ignores the provided username and asks for a password for ubuntu user

  INFO [35c09382] Running /usr/bin/env true on 192.168.0.111
[email protected]'s password:

I found that here username is passed as an option

https://github.com/basecamp/kamal/blob/457f06da13ea0849fb0ac22dec206f30bb26ac38/lib/kamal/cli/build.rb#L114-L122

But it seems like SSHKit expects it as a part of the host name. I was able to connect successfully with the following change:

        on("#{remote_uri.user}@#{remote_uri.host}", options) do

hoblin avatar Dec 05 '23 23:12 hoblin