-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
nix: add config file to NIX_SSHOPTS #141
Conversation
I'd really like to see this merged as well 😅 |
sshOpts = append(sshOpts, fmt.Sprintf("%s", "-o StrictHostkeyChecking=No -o UserKnownHostsFile=/dev/null")) | ||
} | ||
if ctx.ConfigFile != "" { | ||
sshOpts = append(sshOpts, fmt.Sprintf("-F %s", ctx.ConfigFile)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can thing config file be an output of a nix builder or does it have to exist before the deployment is started?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why not. As long as it returns a path and ssh
can access that path when passing -F /path
, should be fine.
@srhb Do you have a minute to look at this? :-) |
I ran into the same bug today and came up with a similar solution (using a string builder). Regardless, i prefer your solution :) |
Thanks! |
Fixes #140.
I don't actually use Morph (yet?), but I semi-validated that this should work by printing the value of
sshOpts
, which showed[-o StrictHostkeyChecking=No -o UserKnownHostsFile=/dev/null -F /tmp]
when runningSSH_SKIP_HOST_KEY_CHECK=true SSH_CONFIG_FILE=/tmp result/bin/morph push ./examples/healthchecks.nix
.