Replies: 1 comment
|
The Why 404 and not 403
For a GitHub App, a repository that isn't covered by the installation is reported as Things to check, in order:
You can confirm all of this directly: # what installations does this token see?
curl -H "Authorization: Bearer $TOKEN" https://api.xxx.ghe.com/user/installations
# which repos are in that installation?
curl -H "Authorization: Bearer $TOKEN" https://api.xxx.ghe.com/user/installations/<id>/repositoriesIf On the OAuth scopes
Note that Metadata: read-only is mandatory for almost every repo endpoint; you have it, but it's the one people most often miss. Secondly — that URL looks malformedThat combines two host styles that the server treats as mutually exclusive. From if u.Hostname() == "ghe.com" || strings.HasSuffix(u.Hostname(), ".ghe.com") {
return newGHECHost(s)
}
return newGHESHost(s)
Your URL has both, which means the host got routed down the GHES path with
If gqlURL = https://api.<host>/graphql // GHEC
uploadURL = https://uploads.<host>/
rawURL = https://raw.<host>/So the sequence I'd follow: fix |
Uh oh!
There was an error while loading. Please reload this page.
We have GitHub Enterprise with data residency and want to use the GH MCP with OAuth.
How do we need to configure the GitHub App (especially permissions) so that this works.
Currently, I get errors when accessing anything but "get_me". Getting my profile works and answers with the correct data.
When accessing other stuff I get errors (mostly 404) - for example when calling "list_pull_requests":
In the GitHub app I have set the following permissions:
In the oauth scope I have set: "repo read:org read:user"
Any idea how to fix this issue? How do you have to setup the OAuth flow and the GitHub App to make this work?
All reactions