Open wamserma opened 4 years ago
Update: The broken pipe was due to the amount of derivations requested and the pipe to the server timing out.
Adding -o ServerAliveInterval=15 -o ServerAliveCountMax=3000
to NIX_SSHOPTS
allowed me to build the system derivation (e.g. pull all the Gigabytes from the store served via SSH).
What remains is the NIX_SSHOPT ignored when invocation happens through nixos-rebuild.sh
. Using ssh-agent
also doesn't make a difference, on the server side I always see a try for interactive authentication.
I marked this as stale due to inactivity. → More info
I closed this issue due to inactivity. → More info
If the nix store is shared via (legacy) ssh,
nix-build
called from the shell works just fine, e.g. copies closures from the host given via extra-binary-caches. But when called fromnixos-rebuild
if fails to authenticate with the private key and tries Password-Authentication.Example: On the server, run
On the client run
Paths are copied as expected from the server, but when nix-build is called here: https://github.com/NixOS/nixpkgs/blob/82875a20ba444110396f95537b18247898e40e22/nixos/modules/installer/tools/nixos-rebuild.sh#L147 the call fails and I get (with tracing enabled, hence the one-off in the line numbers)
If I run (dunno if that makes sense at all):
i get for example
whenever a closure is to be copied from server.
Something similar happened to @tbenst, reported at https://github.com/NixOS/nixpkgs/issues/76860, but somehow that resolved by dark magic while my problem persists.