catalog via github-discovery using a github app defaults to raw reading (unauthenticated)
See original GitHub issueWhen using github-discovery
type, and having a github app
for credentials - fetching the catalog-info.yaml
files from each repo default to fetching via github raw (raw.githubusercontent.com) with no authentication.
This means internal
or private
repos do not work. Similar issue noted here https://github.com/backstage/backstage/issues/1525 and fixed in https://github.com/backstage/backstage/pull/1560 …but I wonder if this bug is related to using a github app
instead of a GITHUB_TOKEN
?
Expected Behavior
github-discovery
should fetch the catalog-info.yaml
files in each repository via the github API using authentication.
Current Behavior
backstage successfully gets a complete list of repos and starts iterating over them, however it fetches each repo using raw github contents, example log entry:
{"type":"plugin","plugin":"catalog","service":"backstage","entity":"location:default/generated-5a8887d861a79f609d66ec8c4ba365c72436ff67","level":"warn","message":"Unable to read url, NotFoundError: https://github.com/example-org/example-private-repo/blob/main/catalog-info.yaml could not be read as https://raw.githubusercontent.com/example-org/example-private-repo/main/catalog-info.yaml, 404 Not Found"}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Is it possible we had a regression on this one? GitHub App Auth is working fine here (e.g. creating PRs for new projects) but fails to load an existing
catalog-info.yaml
:I doubled checked the URL and the credentials as well.
Not really. See https://github.com/backstage/backstage/pull/6787 for a proposed fix!