Repository navigation
Replies: 2 comments
|
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 |
The app has to be registered on the tenantA GHE.com enterprise is isolated from github.com, so an app created at
Then point the server at the tenant and pass that app's client ID github-mcp-server stdio \
--gh-host https://xxx.ghe.com \
--oauth-client-id <CLIENT_ID> \
--oauth-client-secret <SECRET> # only if your app requires oneThe built-in client is registered on github.com and is deliberately not used once a custom host is set The server derives the authorize, token and device endpoints from Why the base URL matters even after the app is rightGitHub's own docs for data residency give the API endpoint as So the If it still 404s after |
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