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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user