Replies: 51 comments 45 replies
-
I also second this, it would be nice if we can define in the permissions configuration section which other repos that belongs to the same organization the GITHUB_TOKEN has access to. The use case for me is consuming shared terraform modules defined in a standalone repo, e.g. 1 repo for shared infra, several repos consuming the shared infra. As of now to get terraform init work correctly we have to go through several unpleasant hops like creating a PAT and updating git config. |
Beta Was this translation helpful? Give feedback.
-
+1 from me as well. My use case are:
|
Beta Was this translation helpful? Give feedback.
-
+1 looks like there is no option other than defining a an organization level secret as a token. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to have a setting that is all private action runners can access all packages in this org. |
Beta Was this translation helpful? Give feedback.
-
I have just been able to solve the problem in our repo. There is an option in the package settings to give certain repositories within the same organization access from the Github Actions. https://github.com/orgs/XXorgaXX/packages/npm/XXrepoXX/settings. Additionally, I had to add the registry URL in the setup-node step:
|
Beta Was this translation helpful? Give feedback.
-
My colleagues and I maintain internal R packages in GitHub repos (not the same "GitHub Packages", which we don't use). We want to have an ecosystem of R packages that depend on one another, and the checks in https://github.com/r-lib/actions rely on the ability of every internal R package to be installed from every internal GitHub Actions repo. To make this work, every user needs to create their own personal access token, which is painful for experienced developers and utterly confusing for new users. @github, would you please allow |
Beta Was this translation helpful? Give feedback.
-
Same issue when i try to access terraform modules inside an action, Please @github any secure solution? |
Beta Was this translation helpful? Give feedback.
-
Yes pls! |
Beta Was this translation helpful? Give feedback.
-
+1, we run a git clone of another repo within the same org as part of one of our workflows and this would be way better than using a user-tied PAT |
Beta Was this translation helpful? Give feedback.
-
Have the same issue. Tried with another org and it works good. Magic |
Beta Was this translation helpful? Give feedback.
-
Yup. Necessary to avoid having long-lived PATs as secrets. |
Beta Was this translation helpful? Give feedback.
-
+1 would love to have this |
Beta Was this translation helpful? Give feedback.
-
+100 please and thank you |
Beta Was this translation helpful? Give feedback.
-
Hey, thanks for all the engagement on this one. Having a hard look at the token and how we enable better multi-repo workflows is on our mind but nothing something we are going to get to this calendar year :( The solutions presented between either Apps or PATs work, but I totally appreciate the pain and lack of satisfaction with both. This is something we know we need to look at, and we will get there in the long run. Thank you for continuing to provide feedback and input <3 Your engagement does guide where we are looking to spend our time and please keep talking to us all. 🫶 |
Beta Was this translation helpful? Give feedback.
-
Just because nobody else has mentioned them: an alternative for some use cases is deploy keys, which are SSH keys that are bound directly to a repository, not a user. If your use case is reading or writing to/from a specific private repository then those can allow it. If you need something other than reading/writing then you'll still need a whole GitHub Apps setup, but 🤷 |
Beta Was this translation helpful? Give feedback.
-
We were really surprised to learn that |
Beta Was this translation helpful? Give feedback.
-
Just to mention it again by using this action https://github.com/qoomon/actions--access-token you don't need pay tokens any more. (You can host the solution your self as well) |
Beta Was this translation helpful? Give feedback.
-
Please stop posting "+1". That's what the upvote button is for. Some people like me subscribed to the thread to get updates on this issue / when it's implemented to be able to improve their CI, so I get an email every time you do. FYI, the GitHub app solution mentioned somewhere above works for the most part and doesn't need any 3rd party solution. |
Beta Was this translation helpful? Give feedback.
-
I wonder if this is more broken that you might think. In our case, we have been trying out an actions workflow to validate repository branch protection rules. The workflow uses curl to access the rules as follows (where there is an env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}):
The So now the odd part. This works when the action is run from a personally owned public repository where the user is part of the organisation i.e. the GITHUB_TOKEN has the right permission there. When run from within another private repository within the organisation, it doesn't work, and there appears no way to give the token the right permissions. How can the token from a personal repo have more permissions that one inside the same organisation? |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
Hello,
It appears that the
GITHUB_TOKEN
secret that is available in Github Actions environments does not have the ability to be configured to read private repositories within the same organization. The only workaround right now is to create permissive PATs that allow this. It seems strange that a PAT is required to read a repository, but not a private package in the github package repository.Should this be a feature request on the permissions available to GITHUB_TOKEN?
Beta Was this translation helpful? Give feedback.
All reactions