Skip to content

Pulling features from ghcr.io breaks when GHE token is set #473

@gpiper14

Description

@gpiper14

There is an issue where pulling a feature from ghcr.io will fail with a 403 if you have a GITHUB_TOKEN env var set for a GitHub Enterprise instance. The issue appears to stem from here as it assumes any GITHUB_TOKEN env var is a github.com 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 the GITHUB_TOKEN for ghcr.io requests if it is set to github.com

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions