lix/src
Maximilian Bosch 104448e75d ssh-ng: Set log-fd for ssh to 4 by default
That's expected by `build-remote` and makes sure that errors are
correctly forwarded to the user. For instance, let's say that the
host-key of `example.org` is unknown and

    nix-build ../nixpkgs -A hello -j0 --builders 'ssh-ng://example.org'

is issued, then you get the following output:

    cannot build on 'ssh-ng://example.org?&': error: failed to start SSH connection to 'example.org'
    Failed to find a machine for remote build!
    derivation: yh46gakxq3kchrbihwxvpn5bmadcw90b-hello-2.12.1.drv
    required (system, features): (x86_64-linux, [])
    2 available machines:
    [...]

The relevant information (`Host key verification failed`) ends up in the
daemon's log, but that's not very obvious considering that the daemon
isn't very chatty normally.

This can be fixed - the same way as its done for legacy-ssh - by passing
fd 4 to the SSH wrapper. Now you'd get the following error:

    cannot build on 'ssh-ng://example.org': error: failed to start SSH connection to 'example.org': Host key verification failed.
    Failed to find a machine for remote build!
    [...]

...and now it's clear what's wrong.

Please note that this is won't end up in the derivation's log.

For previous discussion about this change see
https://github.com/NixOS/nix/pull/7659.

Change-Id: I5790856dbf58e53ea3e63238b015ea06c347cf92
2024-04-26 19:04:06 +02:00
..
build-remote Remove HintFmt::operator% 2024-03-26 15:40:05 -07:00
libcmd libcmd: install generated headers as well 2024-04-11 13:36:04 +00:00
libexpr don't boost::to_few_args when an eval cached string type errors 2024-04-10 18:30:12 -06:00
libfetchers pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
libmain meson: install pkg-config files for libraries 2024-03-29 02:45:48 +00:00
libstore ssh-ng: Set log-fd for ssh to 4 by default 2024-04-26 19:04:06 +02:00
libutil abort with a descriptive message on bad HintFmt usage 2024-04-15 23:09:16 +00:00
nix "but doctor, I AM the untrusted store": nix doctor had wrong trustedness 2024-04-08 15:40:12 -07:00
nix-build Move shell_words into its own file 2024-03-26 16:44:04 -07:00
nix-channel Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
nix-collect-garbage util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
nix-copy-closure Merge pull request #9277 from keszybz/file-permissions 2024-03-04 05:26:17 +01:00
nix-env Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
nix-instantiate Unify and refactor value printing 2024-03-09 03:50:06 +01:00
nix-store libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
resolve-system-dependencies libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
meson.build meson: implement functional tests 2024-03-27 18:37:50 -06:00