fix(renovate): authenticate git with a bearer header and fail the job on repository errors
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 12s

Renovate puts the job token in the clone URL, which git drops when the
server redirects (dry run 2439: could not read Username). Write a global
git http.extraheader like lint.yml does. Renovate exits 0 on a repository
failure: set exitCodeForErrors and check the JSON report for a missing
file or ERROR/FATAL problems.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-10-26 08:40:02 +00:00
1 parent a7ea0e0473
commit 7e32ad5ac6
3 files changed
+50 -7

No files matched your search

+9 -5
View File
@@ -103,14 +103,18 @@ protection, or create tags: those are the operator's.
unauthenticated (no `RENOVATE_GITHUB_COM_TOKEN` exists) and may hit rate limits: best effort.
- **Dry run:** Actions > Renovate > Run workflow with `dry_run=true` (the default for a manual run;
sets `RENOVATE_DRY_RUN=full`, `LOG_LEVEL=debug`). Read the debug log: no branch or PR is created. The
schedule runs live.
schedule runs live. The job fails (it used to stay green) when Renovate exits non-zero
(`RENOVATE_EXIT_CODE_FOR_ERRORS`, 7 for a failed clone) or when the JSON report
(`RENOVATE_REPORT_TYPE=file`) is missing or holds an ERROR or FATAL problem; warnings do not fail it.
A first good dry run shows a clone (no `external-host-error`, no `could not read Username`).
- **Open item: the first live run (do not enable automerge for bot PRs until one has shown it gets Lint and
Build).** The dry run proves the READS (lookups, config, branch plan) and, from the Renovate 44.161.0
source (confirm by the log line for the post-upgrade task), also runs `postUpgradeTasks`. Only the first
LIVE run proves the writes: (1) that the job token can push a branch and open a PR. Renovate puts the
token in the clone URL, while `lint.yml` uses an http extraheader, so basic auth with the job token is
unproven; a fallback is to set `GIT_CONFIG_COUNT`/`GIT_CONFIG_KEY_0`/`GIT_CONFIG_VALUE_0` for the same
extraheader. (2) That PRs opened with the job token trigger the PR workflows: Gitea, like GitHub, may not
LIVE run proves the writes: (1) that the job token can push a branch and open a PR. Git auth: Renovate
puts the token in the clone URL, which git drops on a redirect (dry run 2439 failed so: `could not read
Username`). `renovate.yml` therefore writes a global git config `http.<server>/.extraheader`
(`AUTHORIZATION: bearer <job token>`, like `lint.yml`); Renovate does not pass `GIT_CONFIG_*` from its
environment to git but does pass `HOME`. Unproven until a run clones. (2) That PRs opened with the job token trigger the PR workflows: Gitea, like GitHub, may not
start workflows for events created by the job token, in which case the required `Lint` and `Build`
checks never run and automerge cannot work. If so, the decision is the operator's: either push the PR
with a user token held as a repo secret from a Kamino-only user, or have `renovate.yml` dispatch lint