From 872b0167078a6547a11a1496c9e11160851343e2 Mon Sep 17 00:00:00 2001 From: Eaven Kimura Date: Wed, 21 Oct 2026 08:32:00 +0000 Subject: [PATCH] Fix Gitea CI/CD checkout: use fetch-depth: 50 with git protocol config to resolve 'bad pack header' error --- .gitea/workflows/ci-cd.yml | 45 +++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 59020ea..f694fa8 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -37,7 +37,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 50 + + - name: Configure Git + run: | + git config --global protocol.version 2 + git config --global http.postBuffer 524288000 + git config --global http.lowSpeedLimit 0 + git config --global http.lowSpeedTime 999999 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -102,7 +109,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 50 + + - name: Configure Git + run: | + git config --global protocol.version 2 + git config --global http.postBuffer 524288000 + git config --global http.lowSpeedLimit 0 + git config --global http.lowSpeedTime 999999 - name: Set up Python uses: actions/setup-python@v4 @@ -167,7 +181,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 50 + + - name: Configure Git + run: | + git config --global protocol.version 2 + git config --global http.postBuffer 524288000 + git config --global http.lowSpeedLimit 0 + git config --global http.lowSpeedTime 999999 - name: Set up Python uses: actions/setup-python@v4 @@ -218,7 +239,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 50 + + - name: Configure Git + run: | + git config --global protocol.version 2 + git config --global http.postBuffer 524288000 + git config --global http.lowSpeedLimit 0 + git config --global http.lowSpeedTime 999999 - name: Set up Python uses: actions/setup-python@v4 @@ -275,7 +303,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 50 + + - name: Configure Git + run: | + git config --global protocol.version 2 + git config --global http.postBuffer 524288000 + git config --global http.lowSpeedLimit 0 + git config --global http.lowSpeedTime 999999 - name: Set up QEMU uses: docker/setup-qemu-action@v2