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
This commit is contained in:
Andy Lee
2025-07-25 00:22:01 -07:00
parent 673fd9b7cd
commit 5c836ad08e

View File

@@ -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