From ecd9933c0f56664425620545cb87cb6ca21df602 Mon Sep 17 00:00:00 2001 From: spdis Date: Wed, 18 Mar 2026 21:16:04 +0800 Subject: [PATCH] [0.2.7.4][ci] --- .gitea/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9943b98..5e172d4 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -74,10 +74,10 @@ jobs: if [ -z "$AUTH_TOKEN" ]; then git fetch --depth=1 "$SERVER/$REPO.git" "$REF" elif [ "$USE_BASIC_AUTH" = "true" ]; then - # 使用 Basic Auth: https://token:x-oauth-basic@gitea.com/user/repo.git + # 使用 Gitea 支持的 Basic Auth: https://x-access-token:token@gitea.domain/user/repo.git # 去掉 SERVER 中的 https:// 或 http:// 前缀以构建正确的 URL CLEAN_SERVER=$(echo "$SERVER" | sed -E 's/^\s*.*:\/\///g') - git fetch --depth=1 "https://$AUTH_TOKEN:x-oauth-basic@$CLEAN_SERVER/$REPO.git" "$REF" + git fetch --depth=1 "https://x-access-token:$AUTH_TOKEN@$CLEAN_SERVER/$REPO.git" "$REF" else # 使用 Bearer Token 进行认证 git -c http.extraHeader="Authorization: Bearer $AUTH_TOKEN" fetch --depth=1 "$SERVER/$REPO.git" "$REF"