workflows: clone without auth (public repo, no basic-auth needed)
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:
@@ -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)
|
||||
|
||||
@@ -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/. .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user