From 148a0ce5e4daa4582a7a34489fe47a56dd95ca2e Mon Sep 17 00:00:00 2001 From: noah Date: Sat, 17 Oct 2026 01:04:51 -0600 Subject: [PATCH] Pin benchmark Pages SSH host key --- ci/publish-bench-pages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/publish-bench-pages.py b/ci/publish-bench-pages.py index 5e3e930..5adff3b 100644 --- a/ci/publish-bench-pages.py +++ b/ci/publish-bench-pages.py @@ -16,6 +16,7 @@ GUARD_REPO = "https://gitea.bluefla.re/blueflare/alkane-benchmarks.git" GUARD_COMMIT = "ea160545c49bc419a245692deda8dd7db7a611eb" PAGES_HOST = "gitea.bluefla.re" PAGES_HOST_FINGERPRINT = "SHA256:lqB5cmC9E5HNeg/lkzdOwQ++I8A70Wx7lnNs6liN24g" +PAGES_HOST_KEY = "[gitea.bluefla.re]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1II6NkmRW+QAd+Wj+7qbNrA8Oo+/N/WRog4hELskn/" def run(*args: str, env: dict[str, str] | None = None, @@ -62,16 +63,15 @@ def publish(site: str) -> None: key_path = temporary / "deploy_key" key_path.write_text(key.rstrip("\n") + "\n") key_path.chmod(0o600) - scanned = run("ssh-keyscan", "-p", "2222", "-t", "ed25519", PAGES_HOST) known_hosts = temporary / "known_hosts" - known_hosts.write_text(scanned.stdout) + known_hosts.write_text(PAGES_HOST_KEY + "\n") fingerprint = run("ssh-keygen", "-lf", str(known_hosts)).stdout.split()[1] if fingerprint != PAGES_HOST_FINGERPRINT: raise ValueError("benchmark Pages SSH host key changed") git_env = os.environ.copy() ssh_command = (f"ssh -i {shlex.quote(str(key_path))} -o IdentitiesOnly=yes " f"-o UserKnownHostsFile={shlex.quote(str(known_hosts))} " - "-o StrictHostKeyChecking=yes") + "-o StrictHostKeyChecking=yes -o ConnectTimeout=10") git_env["GIT_SSH_COMMAND"] = ssh_command git_env["GIT_TERMINAL_PROMPT"] = "0" checkout = temporary / "site"