From e5956e40e9bbbb42ac0bdb149a44bccae28eacae Mon Sep 17 00:00:00 2001 From: faumaray Date: Sat, 24 Oct 2026 13:45:56 +0300 Subject: [PATCH] Set CARGO_NET_GIT_FETCH_WITH_CLI in the CI workflow's own env as well The checks action exports it through GITHUB_ENV, which depends on the runner handing a composite action's environment file on to the later steps of the job. If a runner did not, Cargo would silently go back to its built-in git client, which cannot use the deploy key's IdentityFile, and fail with a confusing authentication error in the first cargo command. The workflow-level env does not depend on that, so both are set; the access check step still exercises the key, the host key and the ssh configuration through git. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/ci.yml | 5 +++++ docs/ci.md | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 74c4ab6..df30ffa 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,6 +20,11 @@ on: env: CARGO_TERM_COLOR: always + # Cargo fetches the private VoelinProtocol dependency with the system git and + # ssh (docs/ci.md, "VoelinProtocol access"). The checks action exports this + # too; set here as well, it does not depend on the runner handing a composite + # action's GITHUB_ENV on to the later steps. + CARGO_NET_GIT_FETCH_WITH_CLI: "true" jobs: linux: diff --git a/docs/ci.md b/docs/ci.md index ad35dca..248e525 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -131,7 +131,8 @@ What is set up: line to `~/.ssh/known_hosts`, writes a `Host git.faumaray.com` block to `~/.ssh/config` (`User gitea`, that `IdentityFile`, `IdentitiesOnly yes`, `StrictHostKeyChecking yes`) and exports `CARGO_NET_GIT_FETCH_WITH_CLI=true` - and `GIT_SSH_COMMAND` for the rest of the job. It prints only the key's + and `GIT_SSH_COMMAND` for the rest of the job (`ci.yml` sets the first one + in its own `env` as well). It prints only the key's public fingerprint; the key is never echoed. After the system packages a second step runs `git ls-remote` on VoelinProtocol, so a wrong key or host key fails there, with the reason, and not inside a cargo command. The key