Skip to content

πŸ™Œ OpenHands: AI-Driven Development

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

Xingyao Wang0e2f2f417336
diff --git a/openhands/runtime/utils/runtime_templates/Dockerfile.j2 b/openhands/runtime/utils/runtime_templates/Dockerfile.j2
index 4a4281adbd..2857d454d5 100644
--- a/openhands/runtime/utils/runtime_templates/Dockerfile.j2
+++ b/openhands/runtime/utils/runtime_templates/Dockerfile.j2
@@ -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 "[email protected]"
COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/