Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix permissions issue on macOS when seeding. #1106

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Conversation

gouttegd
Copy link
Contributor

Setting Git's configuration option safe.directory to /work is enough to allow working on a pre-seeded repository (when the repository root is bound to /work in the container), but does not work when seeding a new repository, because then the root of the newly created repository is not the /work directory itself, but is in fact located two directories below that (under /work/target/<name>). The safe.directory directive has thus no effect when seeding.

We must set safe.directory to * instead, to completely disable the permission check regardless of where the repository is. Security-wise, this does not change anything -- that check does not bring any security benefit in the context of the ODK, and we were already disabling it when working on pre-seeded repositories.

closes #1105

Setting Git's configuration safe.directory to /work is enough to allow
working on a pre-seeded repository (when the repository root is bound to
/work in the container), but does not work when seeding a new
repository, because then the root of the newly created repository is not
the /work directory itself, but is in fact located two directories below
that (under /work/target/<name>). The safe.directory directive has thus
no effect when seeding.

We must set safe.directory to "*" instead, to completely disable the
permission check regardless of where the repository is. Security-wise,
this does not change anything -- that check does not bring any security
benefit in the context of the ODK, and we were already disabling it when
working on pre-seeded repositories.

closes #1105
@gouttegd gouttegd self-assigned this Oct 17, 2024
@gouttegd gouttegd merged commit 6ce9aa2 into master Oct 18, 2024
1 check passed
@gouttegd gouttegd deleted the fix-seeding-on-macos branch October 18, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seeding process failing under macOS because of 'dubious ownership in repository'
1 participant