From 076cae6064b6025e147d8f9b3984e90d6bfe7dc5 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 1 May 2026 02:37:39 +0300 Subject: [PATCH] workflows: use x-access-token for git clone (Gitea-compatible) 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) --- .gitea/workflows/build.yml | 4 ++-- .gitea/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b128bdb..20edc18 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout run: | - git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src + git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git -C /tmp/src checkout "$GITHUB_SHA" cp -a /tmp/src/. . - name: Vet @@ -48,7 +48,7 @@ jobs: steps: - name: Checkout run: | - git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src + git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@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) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index fffcae8..f77e6c8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout run: | - git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src + git clone --no-checkout "https://x-access-token:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git -C /tmp/src checkout "$GITHUB_SHA" cp -a /tmp/src/. .