Commit Graph

4 Commits

Author SHA1 Message Date
root 804e32a418 workflows: surface GITHUB_TOKEN via env, use it in clone URL
Build / test (push) Successful in 19s
Build / build-windows (push) Successful in 6s
Release / release (push) Failing after 1m3s
Root cause of the earlier "Failed to authenticate" / "could not read
Username" failures: shell scripts in Gitea Actions don't automatically
inherit secrets — \${GITHUB_TOKEN} expanded to an empty string, so the
URL became "https://forgejo-runner:@..." (empty password) and Gitea's
auth layer rejected it.

Fix: explicit env: block on the Checkout step pulls the token in,
then the URL uses it via x-access-token (canonical token-as-password
username, accepted by Gitea, GitHub, Forgejo alike).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 02:39:42 +03:00
root 8c70640bfd workflows: clone without auth (public repo, no basic-auth needed)
Build / test (push) Failing after 1s
Build / build-windows (push) Has been skipped
Both 'forgejo-runner:$TOKEN' and 'x-access-token:$TOKEN' formulas
are rejected by Gitea's act_runner with HTTP 401:
  remote: Failed to authenticate user
  fatal: Authentication failed

For public repos the simplest fix is: don't send credentials at all.
Plain https://host/owner/repo.git clones unauthenticated and Gitea
serves it (root/drover-go is public).

If/when we move to private repos this'll need a different approach
(GITEA_TOKEN env, oauth2 username, or .netrc) — but that's a future
problem.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 02:38:25 +03:00
root 076cae6064 workflows: use x-access-token for git clone (Gitea-compatible)
Build / test (push) Failing after 1s
Build / build-windows (push) Has been skipped
The hardcoded "forgejo-runner" username worked on Forgejo because its
runner accepted any user when the password is a valid GITHUB_TOKEN.
Gitea's act_runner v0.6+ rejects unknown usernames with:
  remote: Failed to authenticate user
  fatal: Authentication failed for 'https://git.okcu.io/.../...'

x-access-token is the canonical "the password IS the token" username
on GitHub Actions and works equally on Gitea, Forgejo and gitea.com.

Run that surfaced the issue: gitea run #1, task 1, sha 0f63f15,
"Cloning into '/tmp/src'... remote: Failed to authenticate user".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 02:37:39 +03:00
root 0f63f15fd3 Move workflows: .forgejo/workflows → .gitea/workflows
Build / test (push) Failing after 1s
Build / build-windows (push) Has been skipped
After Forgejo→Gitea migration, the new server only scans
.gitea/workflows/ (and .github/workflows/ as fallback) for action
definitions. .forgejo/workflows/ is Forgejo-specific and ignored.

Both files (build.yml, release.yml) move as-is — the YAML schema
itself is identical between Forgejo Actions and Gitea Actions
(both forks of GitHub Actions schema).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 02:35:48 +03:00