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

Error: fatal: detected dubious ownership in repository #582

Closed
t4k opened this issue Nov 21, 2023 · 1 comment
Closed

Error: fatal: detected dubious ownership in repository #582

t4k opened this issue Nov 21, 2023 · 1 comment
Labels
status: pending More info is needed before deciding what to do

Comments

@t4k
Copy link

t4k commented Nov 21, 2023

Describe the bug
Using default_author: github_actions as the docs describe with actions/checkout and I'm getting an error that includes:

> Using 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>' as author.
...
Error: Error: fatal: detected dubious ownership in repository at '/__w/overtime/overtime'

(Seems like the same issue as #556)

Workflow used
I think is is enough to debug:

    steps:
      - uses: actions/checkout@v4
...
      - name: Commit Changes
        uses: EndBug/add-and-commit@v9
        with:
          remove: '--ignore-unmatch --quiet -- content/pages/*.html'
          default_author: github_actions
          message: '🌀 track changes to page content'

Expected behavior
Changes to be committed and github-actions[bot] to be seen as the the author.

Logs

Logs
Run EndBug/add-and-commit@v9
  with:
    remove: --ignore-unmatch --quiet -- content/pages/*.html
    default_author: github_actions
    message: 🌀 track changes to page content
    add: .
    cwd: .
    fetch: --tags --force
    pathspec_error_handling: ignore
    push: true
    github_token: ***
  env:
    pythonLocation: /__t/Python/3.11.6/x64
    PKG_CONFIG_PATH: /__t/Python/3.11.6/x64/lib/pkgconfig
    Python_ROOT_DIR: /__t/Python/3.11.6/x64
    Python2_ROOT_DIR: /__t/Python/3.11.6/x64
    Python3_ROOT_DIR: /__t/Python/3.11.6/x64
    LD_LIBRARY_PATH: /__t/Python/3.11.6/x64/lib
/usr/bin/docker exec  5f0196471c2f3c543649c3601f1ff454afb2132acb3fcc21e4c1d624ff7e0dc2 sh -c "cat /etc/*release | grep ^ID"
Running in /__w/overtime/overtime
Add input parsed as single string, running 1 git add command.
Remove input parsed as single string, running 1 git rm command.
> Using 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>' as author.
> Using "🌀 track changes to page content [actions]" as commit message.
Internal logs
  > Staging files...
  > Adding files...
  Error: Error: fatal: detected dubious ownership in repository at '/__w/overtime/overtime'
  To add an exception for this directory, call:
git config --global --add safe.directory /__w/overtime/overtime

Outputs
committed: false
commit_long_sha: undefined
commit_sha: undefined
pushed: false
tagged: false
tag_pushed: false
Error: Error: fatal: detected dubious ownership in repository at '/__w/overtime/overtime'
To add an exception for this directory, call:

git config --global --add safe.directory /__w/overtime/overtime

@t4k t4k added the status: pending More info is needed before deciding what to do label Nov 21, 2023
@t4k
Copy link
Author

t4k commented Nov 21, 2023

I did not include my whole workflow and I am running this in a container. I had to use options: --user 1001 in the container configuration.

Figured out via actions/checkout#1048 (comment) and actions/runner#2033 (comment).

@t4k t4k closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending More info is needed before deciding what to do
Projects
None yet
Development

No branches or pull requests

1 participant