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>
This commit is contained in:
2026-05-01 02:38:25 +03:00
parent 076cae6064
commit 8c70640bfd
2 changed files with 12 additions and 3 deletions
+10 -2
View File
@@ -29,7 +29,11 @@ jobs:
steps:
- name: Checkout
run: |
git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
# Public repo — clone without auth. Both Gitea and Forgejo
# rejected hardcoded "forgejo-runner"/"x-access-token" basic-auth
# formulas; for an unauthenticated read on public repos plain
# https works on every server.
git clone --no-checkout "https://git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
git -C /tmp/src checkout "$GITHUB_SHA"
cp -a /tmp/src/. .
- name: Vet
@@ -48,7 +52,11 @@ jobs:
steps:
- name: Checkout
run: |
git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
# Public repo — clone without auth. Both Gitea and Forgejo
# rejected hardcoded "forgejo-runner"/"x-access-token" basic-auth
# formulas; for an unauthenticated read on public repos plain
# https works on every server.
git clone --no-checkout "https://git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
git -C /tmp/src checkout "$GITHUB_SHA"
cp -a /tmp/src/. .
- name: Cross-compile drover.exe (windows/amd64)
+2 -1
View File
@@ -18,7 +18,8 @@ jobs:
steps:
- name: Checkout
run: |
git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
# Public repo — clone without auth (see build.yml for rationale).
git clone --no-checkout "https://git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
git -C /tmp/src checkout "$GITHUB_SHA"
cp -a /tmp/src/. .