summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-04-30 15:28:44 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-05-23 13:21:16 +0900
commit3777bf133e00d9ef685e463e51a1fb0350ffb056 (patch)
treec7e79d5b89945e5bb146abc732517c4dcdf162dc /doc
parent6e7d100ee39bdfdb2ad350633c34bcd2dc4ca73a (diff)
machine: hetzner: Fix initial deploy when ssh-key is #f.
This fixes a regression introduced in commit a2ef2bcbfd7 ("machine: hetzner: Allow connections using ssh-agent"), where having no ssh-key would cause the early Hetzner provisioning to fail due to the lack of SSH authentication. * gnu/machine/hetzner.scm (%hetzner-ssh-key-file): New parameter. (<hetzner-configuration>) [ssh-public-key]: Compute default according to the value of the private ssh-key field. Introduce an indirection via... (hetzner-configuration-ssh-public-key): ... this new procedure, to honor %hetzner-ssh-key-file. (hetzner-configuration-ssh-key): Likewise for the private ssh-key. (hetzner-configuration-ssh-key-fingerprint): Rename to... (public-key->fingerprint): ... this, taking just the public key as argument. Update doc. (hetzner-configuration-ssh-key-public): Rename to... (public-key->string-with-type): ...this, for clarity, and accept just a public-key object. Update doc. (hetzner-machine-ssh-key): Exit early with #f when no ssh key is provided. (temporary-ssh-key-file): New procedure. (hetzner-machine-ssh-key-create): Assert a public key is defined. Adjust calls to renamed procedures, and adjust for the `hetzner-api-server-create' API change. (hetzner-machine-enable-rescue-system): Refine doc and fix code path when ssh-key is #f. (hetzner-machine-rescue-install-os): Document. (hetzner-machine-provision): Refine doc. Remove extraneous sleep and #:unwind argument. Limit ssh-session dynamic scope to where it's needed. (cleanup-temporary-ssh-key/maybe): New procedure. (deploy-hetzner): Create and use a temporary SSH key when none is defined, and clean it up when done or on errors. * gnu/machine/hetzner/http.scm (hetzner-api-server-create): Make ssh-keys a keyword argument, and fix execution when it's #f. (hetzner-api-server-enable-rescue-system): Likewise. * tests/machine/hetzner.scm ("deploy-machine-mock-with-unprovisioned-server"): Adjust test. * tests/machine/hetzner/http.scm (create-server) ("hetzner-api-server-create-unit") ("hetzner-api-server-enable-rescue-system-unit") ("hetzner-api-actions-integration") ("hetzner-api-server-enable-rescue-system-integration"): Likewise. * doc/guix.texi (Invoking guix deploy): Precise what happens when 'ssh-key' is #f in hetzner-configuration, and suggest declaratively authorizing your SSH key. Change-Id: I812b348fb553f3b5aebd0bf66850c6ecb9e06653
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index b194dab4b89..14bcc5817b0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -50346,6 +50346,8 @@ accepts store items it receives from the coordinator:
50346# guix archive --authorize < coordinator-public-key.txt 50346# guix archive --authorize < coordinator-public-key.txt
50347@end example 50347@end example
50348 50348
50349@cindex @command{guix deploy, sudo configuration}
50350@anchor{guix-deploy-via-sudo}
50349@code{user}, in this example, specifies the name of the user account to log in 50351@code{user}, in this example, specifies the name of the user account to log in
50350as to perform the deployment. Its default value is @code{root}, but root 50352as to perform the deployment. Its default value is @code{root}, but root
50351login over SSH may be forbidden in some cases. To work around this, 50353login over SSH may be forbidden in some cases. To work around this,
@@ -50562,7 +50564,17 @@ small to bootstrap a Guix system from.
50562 50564
50563@item @code{ssh-key} (default: @code{#f}) 50565@item @code{ssh-key} (default: @code{#f})
50564If specified, the file name of the SSH private key to use to 50566If specified, the file name of the SSH private key to use to
50565authenticate with the remote host. 50567authenticate with the remote host. If left unspecified, a temporary SSH
50568key is used during the early provisioning of the machine, after which
50569the authentication with the final machine is handled by your SSH client
50570or agent. It's a good idea to have your public SSH key authorized
50571declaratively in the @code{operating-system} specification provided, via
50572the @code{authorized-keys} field of the @code{openssh-configuration}
50573record. To be able to run @samp{guix deploy} after the initial
50574provisioning is done, an SSH connection to the root account or a
50575password-less sudo configuration is needed (@pxref{guix-deploy-via-sudo,
50576Invoking guix deploy}). For the later, you must also explicitly specify
50577the @code{user} field, which otherwise defaults to @code{"root"}.
50566 50578
50567@item @code{ssh-public-key} (default: extracted from @code{ssh-key}) 50579@item @code{ssh-public-key} (default: extracted from @code{ssh-key})
50568If specified, either a public key as returned by 50580If specified, either a public key as returned by