From 5c836ad08ea27770bee4eab704ec77d9abb90f83 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Fri, 25 Jul 2025 00:22:01 -0700 Subject: [PATCH] fix: handle git dubious ownership error in manylinux containers - Add multiple safe.directory configurations to cover different possible paths - This fixes 'detected dubious ownership in repository' error - Ensures git works properly in manylinux2014 containers --- .github/workflows/build-reusable.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 9ecada2..36ecd06 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -58,6 +58,12 @@ jobs: # Install git if not available yum install -y git || true + # Configure git to handle the directory ownership issue + git config --global --add safe.directory ${GITHUB_WORKSPACE} + git config --global --add safe.directory /__w/LEANN/LEANN + git config --global --add safe.directory /github/workspace + git config --global --add safe.directory $(pwd) + # Clone the repository manually in the container git init git remote add origin https://github.com/${GITHUB_REPOSITORY}.git