Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(devcontainer): mark workspace as safe dir (#9136)

llamantino6a9065960d0b
diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
index c4035508ef..5912a3c6eb 100755
--- a/.devcontainer/setup.sh
+++ b/.devcontainer/setup.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+# Mark the current repository as safe for Git to prevent "dubious ownership" errors,
+# which can occur in containerized environments when directory ownership doesn't match the current user.
+git config --global --add safe.directory "$(realpath .)"
+
# Install `nc`
sudo apt update && sudo apt install netcat -y