mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2625] pulling remote actions with +x scripts fails with Permission denied on Windows #1194
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @oliverrahner on GitHub (Jan 20, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2625
Bug report info
Command used with act
Describe issue
My workflow uses the custom action
rlespinasse/github-slug-action@v5.When running the step, this happens:
During troubleshooting, I recognized that, immediately after
cloneing the action's repository,git difffrom inside~/.cache/act/rlespinasse-github-slug-action@v5shows the following:When following the trail, I found that this go-git issue describes what's going on, so it really seems to be an upstream issue.
The workflow below is the MRE, thus doesn't do anything useful.
Link to GitHub repository
private
Workflow content
Relevant log output
Additional information
No response
@Redrox477 commented on GitHub (Feb 19, 2025):
Now experiencing the same error , using reviewdog/action-eslint@v1 getting
[reviewdog/runner / eslint] [DEBUG] Working directory '/mnt/c/Projects/Github_test/Git_Actions_test' | /var/run/act/workflow/3-composite-0.sh: line 2: /var/run/act/actions/reviewdog-action-eslint@v1/script.sh: Permission denied [reviewdog/runner / eslint] ❌ Failure - Main $GITHUB_ACTION_PATH/script.sh [reviewdog/runner / eslint] exitcode '126': failure@mitkonikov commented on GitHub (Feb 20, 2025):
I'm getting the same error, when using
xu-cheng-texlive-action@v2, getting:@drakonkat commented on GitHub (Feb 24, 2025):
Same issue here
@Redrox477 commented on GitHub (Feb 24, 2025):
So, I inspected the files while the docker container is built when running act cmd, the script.sh file did not have a execute permission -rw-rw-rw-. I manually set the permission using chmod +x but when running act cmd again, the container is rebuilt and permission to execute file is revoked to just read, write

@mitkonikov commented on GitHub (Feb 24, 2025):
One way I found that I could temporarily fix the issue is to modify the action repo when executing the script to execute it with
bash script.sh. But this requires manually cloning the action repo locally, updating it and changing theymlpath to the local action repo instead (but this complicates the job and is only a temporary solution, since there's no way to flip between local and remote action repos).@ChristopherHX commented on GitHub (Feb 24, 2025):
iff you are not using docker actions, you could enable
--use-new-action-cacheto have the+xbit preserved.Yes the workdir on windows, has not the ability to preserve the executable bit
@oliverrahner commented on GitHub (Feb 24, 2025):
This is not an inherent issue with Git on Windows! When running git clone manually, followed by git diff, there is no difference, as opposed to the thing we see here.
Refer to the upstream issue I linked above for detials
@ChristopherHX commented on GitHub (Feb 24, 2025):
I want to provide you some insights, this issue is not related to any bug of go-git or git for windows
Just make the step act does yourself on windows
+xbit, on windows systems.How would the tar command know if the file has been executable? It can only do this on unix like systems / by using extended undocumented ntfs metadata (wsl1 has a way)
What I have done outside of act was, ask git for windows for the unix mask and merge it with the data of your disk. I no longer remember what I did in act for the workdir.
This is a design issue of the action-cache
Now using cli feature toggle
--use-new-action-cachethe whole thing changesAs far I know, git ignores the
+xbit between git worktree and filesystem on windows. You never want to commit a executable bit removal from windows without using git commands.@mitkonikov commented on GitHub (Feb 24, 2025):
Is there a way to inject a custom command when executing a docker cmd script? Is there a planned resolution for the issue?
@ChristopherHX commented on GitHub (Feb 24, 2025):
No, you need to add it to your yaml and add an
if: env.ACTto skip it outside of act.I had a plan last year between 30. October 2024 - 20. December (yes this predates this issue) see https://github.com/nektos/act/pull/2509.
But due to lack of public code reviews over a period of 2 Months, I stopped this plan and we still have this problem. Similar reason why I didn't comment of this repost of a well known defect earlier.
EDIT fixed year to 2024
@mitkonikov commented on GitHub (Feb 24, 2025):
If you need help in code reviews or testing features, you can sure tag me. Sometimes, I want to relax reading code and issues. 😉
@ChristopherHX commented on GitHub (Feb 25, 2025):
Update starting with upcoming act
v0.2.75Just add
--use-new-action-cacheas a line in your.actrcfile, the fix for the docker actions has been merged and known issues are resolved.