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

Dubious Ownership error for /source/openapi-generator #236

Closed
maly7 opened this issue Feb 16, 2023 · 1 comment · Fixed by #237
Closed

Dubious Ownership error for /source/openapi-generator #236

maly7 opened this issue Feb 16, 2023 · 1 comment · Fixed by #237

Comments

@maly7
Copy link

maly7 commented Feb 16, 2023

When running the generator inside the container, the following error is reported, and generation fails.

/source/openapi-generator /
fatal: detected dubious ownership in repository at '/source/openapi-generator'
To add an exception for this directory, call:

	git config --global --add safe.directory /source/openapi-generator

If it helps, I'm running the generator using java-crd-cmd.sh:

java-crd-cmd.sh -n com.vmware.tanzu.apps.config -p com.vmware.tanzu.acs -l 2 -h true -o /tmp/gen-output -g true

For now, I've worked around the issue by adding RUN git config --system --add safe.directory '/source/openapi-generator' in my fork. I'm happy to contribute the change, but I wasn't sure if this would be the best fix.

@ityuhui
Copy link
Member

ityuhui commented Feb 22, 2023

I agree with @maly7's fix

And I made a PR #237 for maintainers to review this solution.

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 a pull request may close this issue.

2 participants