Permissions error #1011
-
I am getting a permissions error that I am confused about. The error message says:
The complete log is in https://github.com/UCL/UKCORDEX-plot-explorer-dev/runs/4868866705?check_suite_focus=true This is my workflow:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Morning, Are you running this workflow within an organization? If so it might be necessary for you to provide a - name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build
token: ${{ secrets.PAT }} |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick answer! This makes sense, as everything worked when I tried the website on my own user organisation, but it didn't once I tried it in the work one. |
Beta Was this translation helpful? Give feedback.
-
With the PAT token I got a different error: https://github.com/UCL/UKCORDEX-plot-explorer-dev/runs/4881033071?check_suite_focus=true#step:5:49
|
Beta Was this translation helpful? Give feedback.
-
Found the problem, all credit to my colleague @ageorgou :)
Apparently even the default GITHUB_TOKEN only has read permissions if used by a fork. That's the problem, I created the new workflow in a fork of the website repo, and it was the PR where I was trying to merge my changes to the main repo that wouldn't get permissions to access. I merged that repo, then tried from a branch from within the main repo and it all worked via GITHUB_TOKEN. No need for any further permissions. For someone else who runs into this problem and needs to keep on pushing from a fork, a possible solution is to try triggering it on |
Beta Was this translation helpful? Give feedback.
Found the problem, all credit to my colleague @ageorgou :)
Apparently even the default GITHUB_TOKEN only has read permissions if used by a fork.
That's the problem, I created the new workflow in a fork of the website repo, and it was the PR where I was trying to merge my changes to the main repo that wouldn't get permissions to access. I merged that repo, then tried from a branch from within the main repo and it all worked via GITHUB_TOKEN. No need for any further permissions.
For someone else who runs into this problem and needs to keep on pushing from a fork, a possible solution is to try…