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

The repository at "/app" does not have the correct ownership and git refuses to use it #744

Closed
norkunas opened this issue Feb 19, 2025 · 4 comments

Comments

@norkunas
Copy link

 The repository at "/app" does not have the correct ownership and git refuses to use it:
php-1  | 
php-1  | fatal: detected dubious ownership in repository at '/app'
php-1  | To add an exception for this directory, call:
php-1  | 
php-1  | 	git config --global --add safe.directory /app

I get this a lot, it works even without running the suggested line, but this is warned after each docker down and up run's, so it annoys.
How do you resolve this?

@7-zete-7
Copy link
Contributor

Hi @norkunas!

This message occurs during Composer execution. There is already an issue about this message. See composer/composer#12221.

@norkunas
Copy link
Author

Hi :)

So it just should be ignored then..

@maxhelias
Copy link
Collaborator

Thanks @7-zete-7 for the link.
It looks like the issue is on the side of composer so yes just ignore it for now

@creativehubspace
Copy link

services:
  php:
      command: >
      sh -c "git config --global --add safe.directory /app && frankenphp run --config /etc/caddy/Caddyfile"

As a workaround, I have setup this command in my compose.override.yaml for my dev env.

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

No branches or pull requests

4 participants