checkout: Error: File was unable to be removed Error: EACCES: permission denied, rmdir '/opt/actions-runner/_work/...
When I run checout second+ times I have error like this on the title on my ubuntu self-hosted runner. A config is very simple like
on:
push:
branches: [ "production", "developing" ]
pull_request:
branches: [ "production", "developing" ]
workflow_dispatch:
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
testing:
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/compose-action@v1.5.1
with:
up-flags: "--build"
- name: testing
run: "docker compose exec app pytest"
...
This command can help, but just once. After on the next running of job I see the same errors:
sudo chmod -R u+w /opt/actions-runner/_work/
sudo chown -R <username>:<group> /opt/actions-runner/_work/
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 23
- Comments: 17
Commits related to this issue
- fix(ci): try a chmod workaround https://github.com/actions/checkout/issues/1720#issuecomment-2563854886 — committed to geotribu/qtribu by Guts 2 years ago
- fix(ci): try a chmod workaround https://github.com/actions/checkout/issues/1720#issuecomment-2563854886 — committed to geotribu/qtribu by Guts 2 years ago
- fix(ci): try a chmod workaround https://github.com/actions/checkout/issues/1720#issuecomment-2563854886 — committed to geotribu/qtribu by Guts 2 years ago
The only way I have been able to resolve this issue when installing the service as non-root was to:
This worked for one of our pipelines that had two jobs running on a single self hosted server runner. The first job always succeeded but the second job would fail until we added
path: ${{ github.sha }}Also getting this issue. I’m using this workaround with some success.
I faced same issue. But the following code resolve this issue:
(please uninstall existing service, first)
@seniordev-ca Nothing better than this yet