-
Notifications
You must be signed in to change notification settings - Fork 241
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
Pulling features from ghcr.io breaks when GHE token is set #473
Comments
Agreed, GITHUB_TOKEN has the highest precedence - this is especially useful for codespaces where that token can be granted additional scopes through the dev container config. GITHUB_HOST seems like a nice approach, thanks for suggesting that. Even better, we might be able to stop looking at the |
@gpiper14, in your opinion (from the GitHub Enterprise scenario) is it ok behavior to assume that if no I'm thinking to bump GITHUB_TOKEN to have the least precedence (looking at docker config/cred helpers first), and for back compat continuing to fall back to use Is |
That seems like a decent assumption to me, but would likely want to make the behavior clear in some sort of documentation. Im not sure if there is any "official" guidance from github for Thanks for the quick reply on this! |
Thanks for putting this on our radar! |
I'm glad I stumbled on this issue, since I just got burned by this and have been digging around trying to find a workaround. The issue is that we had been using
Anyone know of any immediate workarounds that we can take advantage of? |
This change will be updating the precedence levels so the Is your Feature scoped to be publicly accessible in GHCR? (We have a bit of detail on doing that here if appropriate for your Feature) If not, it's likely this action run's GITHUB_TOKEN doesn't have the necessary scopes to read this private or internal Feature. Is your Feature published to the same organization that you're trying to use it in? Where are you getting the GITHUB_TOKEN from? (Is it the one the actions provides or a PAT?) |
The order of precedence (moving GITHUB_TOKEN after using docker cred stores) has shipped in CLI version 0.39.0. |
There is an issue where pulling a feature from
ghcr.io
will fail with a 403 if you have aGITHUB_TOKEN
env var set for a GitHub Enterprise instance. The issue appears to stem from here as it assumes anyGITHUB_TOKEN
env var is ajackfan.us.kg
token.Possible solution
A possible solution could be to check for the existence of a
GITHUB_HOST
env var, and if it is set, only use theGITHUB_TOKEN
forghcr.io
requests if it is set tojackfan.us.kg
The text was updated successfully, but these errors were encountered: