Fixes the first dry run of the Renovate workflow (Actions run 2439), which never got past the clone and still reported success.
What the dry run showed
The Gitea REST API worked with the job token (Gitea 28.0.0, repository started, default branch main).
The first git call failed five times: ls-remote https://<token>@git.rkdr.net/Mortis/Kamino.git printed redirecting to https://git.rkdr.net/Mortis/Kamino.git/ and then could not read Username. Renovate gave up with external-host-error (cloned: false, repository exit code 7).
The job was green, because the Renovate process exits 0 when a repository fails. As built, a broken nightly run would look successful.
Nothing was created (no branches, PRs or issues). renovate.json and postUpgradeTasks were never read.
Git auth: the step writes a global git config before Renovate starts: http.<server_url>/.extraheader = AUTHORIZATION: bearer $RENOVATE_TOKEN, the same header lint.yml already uses to clone this repo with the job token. Git sends it on every request to the host, including after a redirect, and Renovate's git children find it through HOME. The token appears only through RENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }} in env:. User-supplied GIT_CONFIG_* variables are not passed to Renovate's git children (Renovate 44.161.0 util/exec/env.js), so that route would have been silently dropped. Hostrules/gitUrl=endpoint keep the token in the URL, which is what failed.
Fail the job:RENOVATE_EXIT_CODE_FOR_ERRORS=true makes a failed repository exit 7. Renovate also writes a JSON report (RENOVATE_REPORT_TYPE=file), and an inline python3 -I -c check fails the job on a missing/unreadable report or any ERROR/FATAL problem. Warnings do not fail it. The checker was tested on five synthetic reports (no file, warnings only, ERROR, FATAL, invalid JSON).
Docs describe the auth and what a successful dry run must show.
Verified
actionlint, yamllint and the commit hooks pass; 120 script tests pass.
Not verified (the next dry run settles these)
That the global gitconfig is read by Renovate's git children (assumes HOME is the same and writable).
That Gitea accepts the bearer header for Renovate's ls-remote and fetch (lint.yml proves it only for a plain clone).
Why Gitea redirected the clone in the first place.
That a clone failure now surfaces as exit 7.
The token is readable through the gitconfig by postUpgradeTasks children; they run only the one allowlisted command.
What the next dry run must show
No could not read Username and no External host error; stats cloned: true; a Repository started line followed by branch-plan lines; a post-upgrade task line for python3 scripts/bump_image_versions.py origin/main with no not allowed message; the report written and the step ending with exit 0.
Fixes the first dry run of the Renovate workflow (Actions run 2439), which never got past the clone and still reported success.
## What the dry run showed
- The Gitea REST API worked with the job token (Gitea 28.0.0, repository started, default branch `main`).
- The first git call failed five times: `ls-remote https://<token>@git.rkdr.net/Mortis/Kamino.git` printed `redirecting to https://git.rkdr.net/Mortis/Kamino.git/` and then `could not read Username`. Renovate gave up with `external-host-error` (`cloned: false`, repository exit code 7).
- The job was green, because the Renovate process exits 0 when a repository fails. As built, a broken nightly run would look successful.
- Nothing was created (no branches, PRs or issues). `renovate.json` and `postUpgradeTasks` were never read.
## Changes (`.gitea/workflows/renovate.yml`, `CLAUDE.md`, `CONTRIBUTING.md`)
- **Git auth:** the step writes a global git config before Renovate starts: `http.<server_url>/.extraheader = AUTHORIZATION: bearer $RENOVATE_TOKEN`, the same header `lint.yml` already uses to clone this repo with the job token. Git sends it on every request to the host, including after a redirect, and Renovate's git children find it through `HOME`. The token appears only through `RENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}` in `env:`. User-supplied `GIT_CONFIG_*` variables are not passed to Renovate's git children (Renovate 44.161.0 `util/exec/env.js`), so that route would have been silently dropped. Hostrules/`gitUrl=endpoint` keep the token in the URL, which is what failed.
- **Fail the job:** `RENOVATE_EXIT_CODE_FOR_ERRORS=true` makes a failed repository exit 7. Renovate also writes a JSON report (`RENOVATE_REPORT_TYPE=file`), and an inline `python3 -I -c` check fails the job on a missing/unreadable report or any ERROR/FATAL problem. Warnings do not fail it. The checker was tested on five synthetic reports (no file, warnings only, ERROR, FATAL, invalid JSON).
- Docs describe the auth and what a successful dry run must show.
## Verified
- `actionlint`, yamllint and the commit hooks pass; 120 script tests pass.
## Not verified (the next dry run settles these)
- That the global gitconfig is read by Renovate's git children (assumes `HOME` is the same and writable).
- That Gitea accepts the bearer header for Renovate's `ls-remote` and fetch (`lint.yml` proves it only for a plain clone).
- Why Gitea redirected the clone in the first place.
- That a clone failure now surfaces as exit 7.
- The token is readable through the gitconfig by `postUpgradeTasks` children; they run only the one allowlisted command.
## What the next dry run must show
No `could not read Username` and no `External host error`; stats `cloned: true`; a `Repository started` line followed by branch-plan lines; a post-upgrade task line for `python3 scripts/bump_image_versions.py origin/main` with no `not allowed` message; the report written and the step ending with exit 0.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes the first dry run of the Renovate workflow (Actions run 2439), which never got past the clone and still reported success.
What the dry run showed
main).ls-remote https://<token>@git.rkdr.net/Mortis/Kamino.gitprintedredirecting to https://git.rkdr.net/Mortis/Kamino.git/and thencould not read Username. Renovate gave up withexternal-host-error(cloned: false, repository exit code 7).renovate.jsonandpostUpgradeTaskswere never read.Changes (
.gitea/workflows/renovate.yml,CLAUDE.md,CONTRIBUTING.md)http.<server_url>/.extraheader = AUTHORIZATION: bearer $RENOVATE_TOKEN, the same headerlint.ymlalready uses to clone this repo with the job token. Git sends it on every request to the host, including after a redirect, and Renovate's git children find it throughHOME. The token appears only throughRENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}inenv:. User-suppliedGIT_CONFIG_*variables are not passed to Renovate's git children (Renovate 44.161.0util/exec/env.js), so that route would have been silently dropped. Hostrules/gitUrl=endpointkeep the token in the URL, which is what failed.RENOVATE_EXIT_CODE_FOR_ERRORS=truemakes a failed repository exit 7. Renovate also writes a JSON report (RENOVATE_REPORT_TYPE=file), and an inlinepython3 -I -ccheck fails the job on a missing/unreadable report or any ERROR/FATAL problem. Warnings do not fail it. The checker was tested on five synthetic reports (no file, warnings only, ERROR, FATAL, invalid JSON).Verified
actionlint, yamllint and the commit hooks pass; 120 script tests pass.Not verified (the next dry run settles these)
HOMEis the same and writable).ls-remoteand fetch (lint.ymlproves it only for a plain clone).postUpgradeTaskschildren; they run only the one allowlisted command.What the next dry run must show
No
could not read Usernameand noExternal host error; statscloned: true; aRepository startedline followed by branch-plan lines; a post-upgrade task line forpython3 scripts/bump_image_versions.py origin/mainwith nonot allowedmessage; the report written and the step ending with exit 0.🤖 Generated with Claude Code