From 118e27fd09f4c1734420bc27f5526fb0e6645c3e Mon Sep 17 00:00:00 2001 From: wangchuanli Date: Mon, 14 Sep 2026 15:12:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20push-all.sh=20=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E6=A1=88=E6=94=B9=E4=B8=BA=20HTTPS=E3=80=81base64=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=20CRLF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Windows Git Bash 的 base64 可能带 \r,Basic 头会因此校验失败,改为 tr -d '\r\n' - 推送提示仍写 http://,与已切换的 HTTPS 远端不一致,改正 --- tools/push-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/push-all.sh b/tools/push-all.sh index 14d7bda..74b294b 100755 --- a/tools/push-all.sh +++ b/tools/push-all.sh @@ -29,8 +29,8 @@ IMAGE="$HOST/$USER/$REPO" cd "$(dirname "$0")/.." # ---------- 1. 推代码 ---------- -echo "==> 推送代码到 http://$HOST/$USER/$REPO.git ($BRANCH)" -AUTH="$(printf '%s:%s' "$USER" "$GITEA_TOKEN" | base64 | tr -d '\n')" +echo "==> 推送代码到 https://$HOST/$USER/$REPO.git ($BRANCH)" +AUTH="$(printf '%s:%s' "$USER" "$GITEA_TOKEN" | base64 | tr -d '\r\n')" git -c credential.helper= \ -c http.extraHeader="Authorization: Basic $AUTH" \ push -u origin "$BRANCH"