Interview Prep/GitHub Actions/Runners, Self-hosted & ARC

`fatal: detected dubious ownership in repository at '/__w/app/app'` in a container job on a self-hosted runner.

IntermediateTroubleshootingRunners, Self-hosted & ARC
Answer

Likely causes → Workspace owned by a different UID than the container user (root vs runner user), triggering git's safe.directory check.

Diagnose → ls -ln in the workspace and id in the container.

Fix → git config --global --add safe.directory "$GITHUB_WORKSPACE", or run the container with the runner's UID (options: --user 1001).

Prevent → Ephemeral runners and consistent UIDs across images.

All GitHub Actions questions Roadmap: GitHub Actions

More on Runners, Self-hosted & ARC