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

Unspecified USER in Dockerfile causes checkouts with 'Permission Denied' #53

Open
0xjmux opened this issue Oct 11, 2024 · 1 comment
Open

Comments

@0xjmux
Copy link

0xjmux commented Oct 11, 2024

Hi, I'm trying to use this to build a package with pyinstaller on a self-hosted runner but am running into some issues.

Since the Dockerfile doesn't specify a USER, the commands in entrypoint.sh are run as root, causing the built artifacts to be owned by root:root (See this discussion post).

This is likely not much of an issue on Github hosted runners since the environment is re-provisioned, but on a self hosted runner after the first run of this action the checkout step fails with:

   warning: failed to remove [REPO]/dist/windows: Permission denied
Warning: Unable to clean or reset the repository. The repository will be recreated instead.
Deleting the contents of '/home/jenkins/gha/w1/w/[REPO]
Error: File was unable to be removed Error: EACCES: permission denied, rmdir '/home/jenkins/gha/w1/w/[REPO]/dist/windows'

Because the built artifacts are in the repo directory, this also causes linux builds of the same source to fail. Specifying a USER in the Dockerfile would be greatly appreciated.

@JackMcKew
Copy link
Owner

Please feel free to open a PR with the needed change 🙂

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

2 participants