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:
6
.github/workflows/build-reusable.yml
vendored
6
.github/workflows/build-reusable.yml
vendored
@@ -58,6 +58,12 @@ jobs:
|
|||||||
# Install git if not available
|
# Install git if not available
|
||||||
yum install -y git || true
|
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
|
# Clone the repository manually in the container
|
||||||
git init
|
git init
|
||||||
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
|
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
|
||||||
|
|||||||
Reference in New Issue
Block a user