Both merge_main.yaml and merge_main_and_squash.yaml were written for github.com and rely on:
secrets.GITHUB_TOKEN — doesn't exist on this self-hosted Gitea.
github.repository and a hardcoded https://github.com/admin/brencher.git URL.
When main brencher gets a push, merge_main.yaml runs and tries to fetch --all --prune against github.com — fails with:
remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/admin/brencher.git/'
Use a new repo-level secret GITEA_PUSH_TOKEN (PAT with write access) instead of the GitHub GITHUB_TOKEN.
Build the origin URL from GITHUB_REPOSITORY and GITEA_SERVER_URL (both Gitea Actions-injected env vars), instead of hardcoding github.com.
Use gitea-actions[bot]@noreply.localhost as the commit author identity.
Deploy notes
Before merging this PR, create the secret in admin/brencher:
Generate a PAT for your account (or a dedicated bot) with write access to admin/brencher.
Repo → Secrets → Add: name GITEA_PUSH_TOKEN, value = PAT.
Until the secret is set, the workflow will fail with "secret GITEA_PUSH_TOKEN not found" — same outcome as today (fails), but the failure mode is now correct and the URL works as soon as the secret is added.
Verification (post-merge)
After deploying the secret, the next push to main should make the rebase job succeed: it will fetch all branches from the self-hosted Gitea (using the new URL) and merge main into each.
## Problem
Both `merge_main.yaml` and `merge_main_and_squash.yaml` were written for github.com and rely on:
- `secrets.GITHUB_TOKEN` — doesn't exist on this self-hosted Gitea.
- `github.repository` and a hardcoded `https://github.com/admin/brencher.git` URL.
When `main` brencher gets a push, `merge_main.yaml` runs and tries to `fetch --all --prune` against github.com — fails with:
```
remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/admin/brencher.git/'
```
Last failing run: https://gitea.rudolf.keenetic.link/admin/brencher/actions/runs/63/jobs/812 (Run #63).
## Fix
- Use a new repo-level secret `GITEA_PUSH_TOKEN` (PAT with write access) instead of the GitHub `GITHUB_TOKEN`.
- Build the origin URL from `GITHUB_REPOSITORY` and `GITEA_SERVER_URL` (both Gitea Actions-injected env vars), instead of hardcoding `github.com`.
- Use `gitea-actions[bot]@noreply.localhost` as the commit author identity.
## Deploy notes
Before merging this PR, create the secret in admin/brencher:
1. Generate a PAT for your account (or a dedicated bot) with `write` access to `admin/brencher`.
2. Repo → Secrets → Add: name `GITEA_PUSH_TOKEN`, value = PAT.
Until the secret is set, the workflow will fail with "secret GITEA_PUSH_TOKEN not found" — same outcome as today (fails), but the failure mode is now correct and the URL works as soon as the secret is added.
## Verification (post-merge)
After deploying the secret, the next push to `main` should make the `rebase` job succeed: it will fetch all branches from the self-hosted Gitea (using the new URL) and merge `main` into each.
Both workflows were written for github.com and relied on the implicit
secrets.GITHUB_TOKEN + github.repository + a hardcoded github.com URL.
On this self-hosted Gitea instance (ghauth.rudolf.keenetic.link) they fail
with "Invalid username or token. Password authentication is not supported
for Git operations." against https://github.com/admin/brencher.git.
The fix:
- Read the push token from a new repo-level secret GITEA_PUSH_TOKEN
(admin/brencher). Same value is injected into the checkout and into the
rewritten remote URL so push can succeed.
- Build the origin URL from Gitea-injected GITHUB_REPOSITORY and
GITEA_SERVER_URL instead of hardcoding github.com.
- Update git user.email/name for the Gitea Actions identity.
To enable: create secret GITEA_PUSH_TOKEN in admin/brencher (a PAT with
write access to the repo) via the Gitea UI before merging this PR.
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.
Problem
Both
merge_main.yamlandmerge_main_and_squash.yamlwere written for github.com and rely on:secrets.GITHUB_TOKEN— doesn't exist on this self-hosted Gitea.github.repositoryand a hardcodedhttps://github.com/admin/brencher.gitURL.When
mainbrencher gets a push,merge_main.yamlruns and tries tofetch --all --pruneagainst github.com — fails with:Last failing run: https://gitea.rudolf.keenetic.link/admin/brencher/actions/runs/63/jobs/812 (Run #63).
Fix
GITEA_PUSH_TOKEN(PAT with write access) instead of the GitHubGITHUB_TOKEN.GITHUB_REPOSITORYandGITEA_SERVER_URL(both Gitea Actions-injected env vars), instead of hardcodinggithub.com.gitea-actions[bot]@noreply.localhostas the commit author identity.Deploy notes
Before merging this PR, create the secret in admin/brencher:
writeaccess toadmin/brencher.GITEA_PUSH_TOKEN, value = PAT.Until the secret is set, the workflow will fail with "secret GITEA_PUSH_TOKEN not found" — same outcome as today (fails), but the failure mode is now correct and the URL works as soon as the secret is added.
Verification (post-merge)
After deploying the secret, the next push to
mainshould make therebasejob succeed: it will fetch all branches from the self-hosted Gitea (using the new URL) and mergemaininto each.