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: "Not a git repository" error of git diff on make ci #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

called-d
Copy link

@called-d called-d commented Oct 1, 2024

$ git diff run inside a Docker container was always failing. This seemed to be a problem related to directory ownership, which was resolved by setting safe.directory.

root@fc2e2ac9ff53:/workers-wasi# make -j ci
...

Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>
make: *** [Makefile:10: ci] Error 129
root@fc2e2ac9ff53:/workers-wasi# git status
fatal: detected dubious ownership in repository at '/workers-wasi'
To add an exception for this directory, call:

        git config --global --add safe.directory /workers-wasi

https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory

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.

1 participant