Add global git configuration to Dockerfile.j2 (#10080)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Xingyao Wang 2025-08-04 16:10:09 -04:00 committed by GitHub
parent 5554b7b418
commit 0e2f2f4173
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,7 +210,10 @@ RUN /openhands/micromamba/bin/micromamba create -n openhands -y && \
RUN \
if [ -d /openhands/code ]; then rm -rf /openhands/code; fi && \
mkdir -p /openhands/code/openhands && \
touch /openhands/code/openhands/__init__.py
touch /openhands/code/openhands/__init__.py && \
# Set global git configuration to ensure proper author/committer information
git config --global user.name "openhands" && \
git config --global user.email "openhands@all-hands.dev"
COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/