-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Sporadic 403 Errors #305
Comments
Thanks for raising this issue. The workflow log shows "Permission denied".
Do you have set up any special settings in the repository? Protected branches? Special workflow permissions (Settings → Actions → General → Workflow permissions)? I think this might also be related to the But some older runs fail due to the usage of protected branches: log For that, you will need to use a PAT. See docs.
git-auto-commit doesn't deal with git authentication at all. actions/checkout is responsible for this. |
Thank you, @stefanzweifel!
The repo in question is a fork without any branch protections applied to it. Also, "Edit from Maintainers" is (default) checked on for the PR. Default workflow permissions (read and write).
Yes, I see this sporadically for my PRs.
Ah yes, that are pushes, I need to disable these or add a PAT. Generally, I try to update pre-merge in PRs.
Really interesting. Yes I wonder if this causes it - could the auth time out if there is too much time spend between checkout and push? |
Ah! That might be the clue. We have docs for this here: https://github.com/stefanzweifel/git-auto-commit-action#use-in-forks-from-public-repositories It's also important that you check out the right repository using The bad part here is the step may no longer work if the workflow is triggered using When I look closer at a workflow run, it becomes clearer what is failing. For example this workflow run. |
Now I see the error again here: But only took 4min between checkout and push. |
Oh wow, I did not know a
I'll try |
Hey @stefanzweifel I'm seeing a similar behaviour. Sporadic 403 errors, re-running the workflow usually fixes the issue. Failing run - action. The run after it works - action The action file is https://github.com/opentofu/registry-stable/blob/f2177346eafbc7fcdee2b35d304666665650278f/.github/workflows/bump-versions.yml |
Thanks for reporting @RLRabinowitz. |
Created a scoped personal access token to use checkout and push. This should help with the sporadic 403 errors, likely from timeouts of the checkout permissions: stefanzweifel/git-auto-commit-action#305
Created a scoped personal access token to use checkout and push. This should help with the sporadic 403 errors, likely from timeouts of the checkout permissions: stefanzweifel/git-auto-commit-action#305
Created a scoped personal access token to use checkout and push. This should help with the sporadic 403 errors, likely from timeouts of the checkout permissions: stefanzweifel/git-auto-commit-action#305
Created a scoped personal access token to use checkout and push. This should help with the sporadic 403 errors, likely from timeouts of the checkout permissions: stefanzweifel/git-auto-commit-action#305
I'm closing this issue for now, as we never really could figure out, why the workflow runs sporadicly fail. |
git-auto-commit Version
v4
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
Hi,
I am using the latest recommended permission settings to update pull requests.
Sporadically, even though nothing changed, I see errors of this kind:
Steps to reproduce
Last run was in:
https://github.com/AMReX-Codes/pyamrex/actions/runs/6398796490/job/17370800918
My action file is:
https://github.com/AMReX-Codes/pyamrex/blob/9a2614a651b3133091bcf592a92e850cf61b621f/.github/workflows/stubs.yml
Tried solutions
I do not use a PAT yet.
I think the solution might be related to switching from
https://github.com/user/repo
to[email protected]:user/repo.git
style repos to avoid the HTTPS auth?Example Workflow
My action file is:
https://github.com/AMReX-Codes/pyamrex/blob/9a2614a651b3133091bcf592a92e850cf61b621f/.github/workflows/stubs.yml
Relevant log output
log.txt
The text was updated successfully, but these errors were encountered: