-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error in GitHub Workflow: detected dubious ownership in repository #5
Comments
In GitHub actions `pgxn-bundle` was failing to run `git archive` because the `git rev-parse` command it uses to test whether it's working in a Git tree was failing with the suppressed error "detected dubious ownership in repository". Fix it by running this command in `entrypoint.sh`: ```shell git config --system --add safe.directory "$PWD" ``` So that the working directory is always considered safe. Also tweaked the test to fail if it doesn't use `git archive` to zip the files, and updated `pgxn-bundle` to say whether it's archiving from a Git repo or zipping all the files. Also turned on verbosity for `git archive` to emit the list of files added to the zip archive. Fixes #5. Other changes: * Use the Docker `--volume` option instead of `--mount` in tests and documentation. * Upgrade checkout and Docker GitHub actions. * Update copyright year. * Document installed Apt packages.
In GitHub actions `pgxn-bundle` was failing to run `git archive` because the `git rev-parse` command it uses to test whether it's working in a Git tree was failing with the suppressed error "detected dubious ownership in repository". Fix it by running this command in `entrypoint.sh`: ```shell git config --system --add safe.directory "$PWD" ``` So that the working directory is always considered safe. Also tweaked the test to fail if it doesn't use `git archive` to zip the files, and updated `pgxn-bundle` to say whether it's archiving from a Git repo or zipping all the files. Also turned on verbosity for `git archive` to emit the list of files added to the zip archive. Fixes #5. Other changes: * Use the Docker `--volume` option instead of `--mount` in tests and documentation. * Upgrade checkout and Docker GitHub actions. * Update copyright year. * Document installed Apt packages.
In GitHub actions `pgxn-bundle` was failing to run `git archive` because the `git rev-parse` command it uses to test whether it's working in a Git tree was failing with the suppressed error "detected dubious ownership in repository". Fix it by running this command in `entrypoint.sh`: ```shell git config --system --add safe.directory "$PWD" ``` So that the working directory is always considered safe. Also tweaked the test to fail if it doesn't use `git archive` to zip the files, and updated `pgxn-bundle` to say whether it's archiving from a Git repo or zipping all the files. Also turned on verbosity for `git archive` to emit the list of files added to the zip archive. Fixes #5. Other changes: * Use the Docker `--volume` option instead of `--mount` in tests and documentation. * Upgrade checkout and Docker GitHub actions. * Update copyright year. * Document installed Apt packages.
Unfortunately this is still happening in one of my projects. Re-opening till I can figure it out. |
Rather than modify it in the repository and potentially create weird conflicts. Generate it from an input file, instead. Use `git config --add safe.directory` to tell Git to trust the current directory, even though it is used by a different user. This is required to work around pgxn/docker-pgxn-tools#5. But also use the newly-released `pgxn/pgxn-tools:1.4` image to build the distribution, so as to use the new `GIT_BUNDLE_OPTS` variable to add the generated `META.json` file to the bundle. It would otherwise be excluded because `git archive` includes only committed files.
Okay, #6 legit fixes this issue for someone just running the image, as demonstrated in this run failing without |
Going to try to disable this security check in the Docker image. |
At least when running as the root user. Looks like it can be fixed by adding a command to
entrypoint.sh
The text was updated successfully, but these errors were encountered: