-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Describe the bug
I am trying to instruct an agent to read anything from another repository within my organization. I have resorted to using a PAT that has access to everything to no avail. It is able to search all of the repositories in the org, but it consistently shows a 404 returned when it tries to actually pull any data from the source repository other than the metadata. I've tried all models and multiple prompt variations.
This MCP configuration is in my repository's settings, and it appears to be working because the search function didn't work before I added the PAT. It is able to write to the source repository for which it has been configured, but it refuses to reach out to other repositories for some reason.
Affected version
https://github.com/copilot/agents
Steps to reproduce the behavior
- Configure the github MCP with a PAT in the copilot agents section of the repository settings
- In the GH browser UI, type "Read the file content from any repository within this organization" or "Copy the folder structure in myorg/other-repository" in Agent mode (not Ask)
Expected vs actual behavior
No errors
Logs
Copilot's response eventually ends in:
"The GitHub token provisioned for this agent has access only to myorg/this-repo. While the search API returns metadata about other repositories in the org, all direct read operations (file contents, branches, commits, issues) against myorg/any-other-repo or any other repository besides myorg/this-repo return 404 errors."