krebs / krops

Mirror of https://cgit.krebsco.de/krops/about/ (PRs / issues accepted, as can be seen by not having them disabled)
Do What The F*ck You Want To Public License
135 stars 18 forks source link

target.extraOptions fails to deal with spaces #29

Open jonasnick opened 3 years ago

jonasnick commented 3 years ago

A normal usage of SSH is to execute ssh -i id. target.extraOptions expects that there's no space between -i and id. If there is, then it fails with a difficult to understand error message (note the double space before id)

Warning: Identity file  id not accessible: No such file or directory.

The corresponding krops-configuration.nix contains [...] -e ssh -i\\\ id.

CC @erikarvstedt

4z3 commented 3 years ago

The quoting of arguments is intentional. You can use ["-i" "id"] to achieve the desired behavior.

Warning: Identity file id not accessible: No such file or directory.

That's indeed an unfortunate error message. :)

jonasnick commented 3 years ago

It's indeed pretty clear what to do once you figure out what the issue is (["-iid"] works too). Since that took me a long time, it may be worth to mention in the README at least (or perhaps change the example to "-o" "LogLevel=DEBUG").