-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
gh copilot resolves the repository owner incorrectly when the local filesystem username differs from the GitHub organization that owns the repo.
Expected behavior
gh copilot should resolve the repo owner from git remote get-url origin, matching how gh repo view works.
Actual behavior
gh copilot uses the local filesystem username (runithomsen) as the repo owner instead of the actual GitHub organization (runi-finance) from the git remote.
This causes all GitHub MCP tool calls within Copilot agents to fail with 404:
✘ github-mcp-server-issue_read
MCP error 0: failed to get issue: GET
https://api.github.com/repos/runithomsen/governance/issues/189: 404 Not Found []
Steps to reproduce
- Clone an org repo:
git clone https://github.com/runi-finance/governance.git - Verify remote:
git remote get-url origin→https://github.com/runi-finance/governance.git - Verify
ghresolves correctly:gh repo view --json owner→{"owner":{"login":"runi-finance"}} - Run copilot with an agent that uses GitHub MCP tools
- Observe that MCP calls target
runithomsen/governanceinstead ofruni-finance/governance
Environment
gh copilotversion: 1.2.0 (2025-10-30)ghversion: (latest)- OS: macOS (Darwin 25.2.0)
- Git remote:
https://github.com/runi-finance/governance.git
Impact
All GitHub MCP server tool calls (issue reads, PR reads, code search scoped to repo) fail with 404 when the repo is owned by an organization different from the local username. This effectively breaks any Copilot agent that needs to interact with GitHub issues or PRs in org-owned repos.