Before submitting#
Area#
GitHub repository import and native GitHub API authentication on a remote server.
Reproduction#
- Use one GitHub login with two fine-grained PATs: token A can access private repositories in organisation A; token B can access private repositories in organisation B.
- Configure Git's global HTTPS credential helpers to choose the matching existing token for each owner/repository. Both repositories clone successfully over HTTPS with this configuration.
- Save token A in T3's Source Control settings for github.com.
- Choose New Project → GitHub repository and enter a private repository in organisation B, before any checkout exists.
Expected#
An explicitly enabled repository-aware authentication option should let T3's native GitHub requests reuse the credential Git selects for the target repository, including separate PATs for the same login. Existing host-wide authentication should remain the default.
Actual#
Repository lookup fails with:
Source control repository operation lookupRepository failed for github: The source control operation could not be completed.
The saved host token wins even though Git already has a working credential for the requested repository. GitHub responds 404 for a private repository outside that token's scope. Switching the selected gh account cannot distinguish two owner-scoped PATs with the same GitHub login.
Environment and evidence#
T3 Code 0.1.0, source 81493efb71e8e8244f95d3e9f71d8369654ab151, Linux x64 remote server reached by browser and Windows desktop. An isolated stock-server native WebSocket lookup reproduced the failure for organisation B while organisation A succeeded. With an opt-in patch using the existing global Git helpers, both lookups (shorthand and full HTTPS URL), native HTTPS clone, and mixed-organisation pull-request listing/detail succeeded. No credential store or account permissions were changed.
Related: #14123, #16068 and #17004. Open PRs #20337 and #19013 address account/cwd selection; this report specifically covers repository-scoped Git HTTPS PATs belonging to the same login and lookup before clone. It does not claim every multi-account issue has the same cause.
Fresh triage: this reports a failed repository lookup, not an exploitable vulnerability. The same-login, separate-PAT import case is distinct from the per-checkout and multi-account PR cases in #17004, #14123, and #16068.
Runtime verification is blocked: this environment has no supplied test fixture with two fine-grained PATs for the same login and private repositories in two organisations. No app reproduction was run, and no fix is proposed. Maintainer verification with that fixture is needed; do not post tokens here. Changing credential selection also requires maintainer handling under the automated triage rules.