From 0068e787fb59d5e423182e535c19fc09b6af1d01496b582d88c3be91ef0d8364 Mon Sep 17 00:00:00 2001 From: ahdoawhfo Date: Fri, 17 Apr 2026 13:35:10 +0800 Subject: [PATCH] Set GIT_DEFAULT_HASH for SHA-256 repo The repository is initialized with the SHA-256 object format, but actions/checkout runs `git init` in the workspace before fetching. Without GIT_DEFAULT_HASH=sha256 that init defaults to SHA-1 and fetch fails with `mismatched algorithms: client sha1; server sha256`. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8553274..f60f8bc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -35,6 +35,10 @@ on: jobs: build-release: runs-on: ubuntu-latest + env: + # 仓库使用 SHA-256 对象格式,actions/checkout 内部 `git init` 需在此模式下运行,否则 fetch 会报 + # `mismatched algorithms: client sha1; server sha256`。 + GIT_DEFAULT_HASH: sha256 steps: - name: Checkout (full history) uses: actions/checkout@v4