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

fatal: detected dubious ownership in repository at '/github/workspace' #116

Closed
Stiofan opened this issue Feb 2, 2023 · 10 comments · Fixed by #119
Closed

fatal: detected dubious ownership in repository at '/github/workspace' #116

Stiofan opened this issue Feb 2, 2023 · 10 comments · Fixed by #119
Assignees
Labels
help wanted Extra attention is needed type:bug Something isn't working.
Milestone

Comments

@Stiofan
Copy link

Stiofan commented Feb 2, 2023

When using a .gitattributes file (instead of a .distignore ) we got the following error when deploying the plugin:

➤ Copying files...
ℹ︎ Using .gitattributes
fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

	git config --global --add safe.directory /github/workspace
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

This folder is not in our repo, it seems to be a github default folder so...
Our repo: https://github.com/AyeCode/google-maps-api-key

This error seems to be appearing for a few other actions recently
robotology/gh-action-nightly-merge#11
actions/checkout#766

The solution seems to be to either use the .distignore file or you need to add this to your deploy script:

# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
@vikrampm1 vikrampm1 added the type:bug Something isn't working. label Feb 2, 2023
@Stiofan
Copy link
Author

Stiofan commented Feb 10, 2023

Any feedback on this? I can make a pull request if required? I'd prefer not to have to fork...

@DannyCooper
Copy link

I'm also getting this error, did you find a workaround @Stiofan?

@Stiofan
Copy link
Author

Stiofan commented Feb 27, 2023

I'm also getting this error, did you find a workaround @Stiofan?

Yes, add a .distignore file to your repo, and add the things you don't want to be uploaded there, this makes it skip the problematic part of the code.
Example file: https://github.com/AyeCode/invoicing/blob/master/.distignore

Hopefully, they can still fix the issue though.

@DannyCooper
Copy link

Thanks for sharing a working solution!

@musamamasood
Copy link

@Stiofan Thank you for sharing the solution and save the day.

@nielslange
Copy link

Thanks for sharing the workaround, @Stiofan! 🙌

@jeffpaul jeffpaul moved this from Incoming to To Do in Open Source Practice Mar 20, 2023
@jeffpaul jeffpaul added the help wanted Extra attention is needed label Mar 20, 2023
@jeffpaul jeffpaul added this to the 2.2.0 milestone Mar 20, 2023
@rahulsprajapati rahulsprajapati self-assigned this Mar 30, 2023
@rahulsprajapati rahulsprajapati moved this from To Do to In Progress in Open Source Practice Mar 30, 2023
@rahulsprajapati rahulsprajapati moved this from In Progress to In Review in Open Source Practice Mar 30, 2023
jeffpaul added a commit that referenced this issue Apr 10, 2023
Fixes #116: detected dubious ownership issue for github workspace.
@github-project-automation github-project-automation bot moved this from In Review to Merged in Open Source Practice Apr 10, 2023
@alexminza
Copy link

This issue was closed but I still do encounter it: https://github.com/alexminza/wc-victoriabank/actions/runs/4707791867/jobs/8349876966

@nielslange
Copy link

This issue was closed but I still do encounter it: https://github.com/alexminza/wc-victoriabank/actions/runs/4707791867/jobs/8349876966

Hello @alexminza 👋

On https://github.com/alexminza/wc-victoriabank/blob/7f950a72c096b17a95e24522480e04081d38f579/.github/workflows/action-wordpress-plugin-deploy.yml#L13, I saw that you're loading this dependency like this:

10up/action-wordpress-plugin-deploy@master

Looking at the corresponding PR, I see that the fix had been merged into develop.

If you load the dependency like this, the problem should be solved on your end:

10up/action-wordpress-plugin-deploy@develop

@alexminza
Copy link

alexminza commented Apr 17, 2023

Good observation @nielslange - thanks!
I would prefer using a stable version for plugin deployments - any chance this is going to be pushed to master soon?

@nielslange
Copy link

any chance this is going to be pushed to master soon?

develop seems to be the new master. 🙈

@jeffpaul Can you clarify what's going on with stable and master?

dkotter added a commit to 10up/action-wordpress-plugin-build-zip that referenced this issue Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type:bug Something isn't working.
Projects
Archived in project
8 participants