-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH: allow setting config: false
to ignore local user ~/.ssh/config
#908
Conversation
@jeremy are you sure that it exists? I cannot find it, to be honest. |
You mean the sshkit config option, or ? |
It eventually lands in Can verify by passing |
@jeremy thanks for the explanation. |
I saw this change on the documentation site, but anything else than a boolean isn't accepted. Specifically this:
ssh:
config: "config/ssh_config" ❯ kamal config
ERROR (Kamal::ConfigurationError): ssh/config: should be a boolean I tested this on both 2.2.2 and 74a06b0. |
This gets passed through to SSHKit options. See basecamp#908 Documentation mentions a string or array of strings are allowed, but they are not because: * Validator example supplies a boolean, so only true/false are enabled. * `Kamal::Configuration::Ssh#options` doesn't expose `config`, used in lib/kamal/commander.rb:167
I made a PR #1129 that seems to make this config option do something. |
This option is documented as available since basecamp#908 in: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this the options don't seem to pass through to SSHKit: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167 Since `config` isn't actually return in this hash.
…rings This is accepted by Net::SSH, research done by @jeremy in basecamp#908 (comment) This is already documented as working correctly in https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this change only booleans were allowed because of the example configuration file.
@Burgestrand note this applies to |
@jeremy I don't understand, but I'd like to. This change was made to lib/kamal/configuration/docs/ssh.yml, which is specifically
|
This option is documented as available since basecamp#908 in: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this the options don't seem to pass through to SSHKit: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167 Since `config` isn't actually returned in `#options`.
…rings This is accepted by Net::SSH, research done by @jeremy in basecamp#908 (comment) This is already documented as working correctly in https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this change only booleans were allowed because of the example configuration file.
Yep, it's confusing for sure. SSHKit is configured with config.ssh.options here: Line 167 in 74a06b0
From there can trace along with #908 (comment) |
Hmm, indeed! That is the limited/curated set of options. I'll take a closer look at how I was getting the raw config through to SSHKit in my testing. |
This option is documented as available since basecamp#908 in: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this the options don't seem to pass through to SSHKit: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167 Since `config` isn't actually returned in `#options`.
This is accepted by Net::SSH, research done by @jeremy in basecamp#908 (comment) This is already documented as working correctly in https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this change only booleans were allowed because of the example configuration file.
This option is documented as available since basecamp#908 in: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this the options don't seem to pass through to SSHKit: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167 Since `config` isn't actually returned in `#options`.
This is accepted by Net::SSH, research done by @jeremy in basecamp#908 (comment) This is already documented as working correctly in https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/configuration/docs/ssh.yml#L65-L70 However, before this change only booleans were allowed because of the example configuration file.
Documents the existing
config
option so it can be set via Kamal config. Allows settingconfig: false
to ignore users'~/.ssh/config
.