Skip to content

Extension mistakenly thinks I'm using GH Enterprise with global "url aliasing" #4551

Closed

Description

I have the following lines in my ~/.gitconfig:

[url "https://github.com/"]
  insteadOf = "github:"
  pushInsteadOf = "[email protected]:"
[url "[email protected]:"]
  insteadOf = "gh:"
  pushInsteadOf = "github:"
  pushInsteadOf = "git://github.com/"

(The effect is that I can do git clone github:user/public or git clone gh:user/private)

However I think the extension is getting confused about the gh: prefix and not reflecting my global git config.

For example, on such a private repo:

$ git config remote.origin.url
gh:user/private
$ git remote get-url origin
[email protected]:user/private

$ git remote show origin -n
* remote origin
  Fetch URL: [email protected]:user/private
  Push  URL: [email protected]:user/private

If handling these config options directly isn't an option, a way of forcing the ext to use github.com would be good too.

The error I'm getting in the "GitHub Pull Request" output is

[Debug 1676975618.298s] Authentication> GitHub Enterprise provider selected without URI.

and a generic notification of "Error signing in to GitHub Enterprise. [Try Again?] [Cancel]" is shown

Activity

  1. ashb commented on Feb 21, 2023

    @ashb
    Author
    Debug Logs
    [Debug 1676975758.585s] Activation> Creating API implementation.
    [Debug 1676975758.586s] Activation> Initializing state.
    [Debug 1676975758.587s] Activation> Creating credential store.
    [Debug 1676975760.684s] RateLimit> API call count: 127 (Viewer)
    [Debug 1676975760.71s] Activation> Registering built in git provider.
    [Debug 1676975760.71s] Activation> Registering live share git provider.
    [Debug 1676975760.711s] Activation> Creating tree view.
    [Debug 1676975760.712s] Looking for git repository
    [Debug 1676975760.712s] Found 0 repositories during activation
    [Debug 1676975760.713s] Git repository found, initializing review manager and pr tree view.
    [Debug 1676975760.723s] Registering git provider
    [Debug 1676975760.726s] Review> Validate state in progress
    [Debug 1676975760.727s] Review> Validating state...
    [Debug 1676975760.727s] Cannot updates repositories as git is uninitialized
    [Debug 1676975760.729s] RateLimit> API call count: 128 (/notifications)
    [Debug 1676975761.231s] GitPostCommitCommands> Trying to register post commit commands.
    [Debug 1676975761.27s] Review> Queuing additional validate state
    [Debug 1676975761.27s] Repo state for file:///home/ash/code/repo changed.
    [Debug 1676975761.27s] Repo file:///home/ash/code/repo has already been setup.
    [Debug 1676975761.535s] Review> Validating state...
    [Debug 1676975761.535s] Cannot updates repositories as git is uninitialized
    [Debug 1676975762.307s] RateLimit> Rate limit remaining: 4912
    [Debug 1676975762.338s] Git initialization state changed: state=initialized
    [Debug 1676975762.338s] Review> Validate state in progress
    [Debug 1676975762.338s] Review> Validating state...
    [Debug 1676975762.498s] Review> current branch pagination is associated with pull request #118
    [Debug 1676975762.498s] Review> Resolving pull request
    [Debug 1676975762.5s] GitHubRepository> Fetch pull request 118 - enter
    [Debug 1676975762.5s] RateLimit> API call count: 129 (PullRequest)
    [Debug 1676975762.639s] GitHubServer> No response from host https://gh/user/private: request to https://gh/api/v3/rate_limit failed, reason: getaddrinfo ENOTFOUND gh
    [Debug 1676975762.639s] GitHubServer> Host https://gh/user/private is associated with GitHub: 0
    [Debug 1676975762.64s] No remotes found. The following remotes are missing: origin, upstream
    [Debug 1676975762.64s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
    [Debug 1676975762.64s] No GitHub remotes found for folder /home/ash/code/repo
    [Debug 1676975762.644s] GitPostCommitCommands> Trying to register post commit commands.
    [Debug 1676975762.968s] Review> current branch pagination is associated with pull request #118
    [Debug 1676975762.968s] Review> Resolving pull request
    [Debug 1676975762.969s] GitHubRepository> Fetch pull request 118 - enter
    [Debug 1676975762.969s] RateLimit> API call count: 130 (PullRequest)
    [Debug 1676975762.995s] RateLimit> Rate limit remaining: 4920
    [Debug 1676975762.999s] GitHubRepository> Fetch all pull requests - enter
    [Debug 1676975763s] RateLimit> API call count: 131 (/repos/{owner}/{repo}/pulls)
    [Debug 1676975763.78s] RateLimit> Rate limit remaining: 4905
    [Debug 1676975763.782s] GitHubRepository> Fetch all pull requests - done
    [Debug 1676975763.784s] RateLimit> API call count: 132 (GetChecks)
    [Debug 1676975763.786s] RateLimit> API call count: 133 (GetChecks)
    [Debug 1676975763.786s] RateLimit> API call count: 134 (GetChecks)
    [Debug 1676975763.787s] RateLimit> API call count: 135 (GetChecks)
    [Debug 1676975763.891s] RateLimit> Rate limit remaining: 4911
    [Debug 1676975763.891s] RateLimit> Rate limit remaining: 4911
    [Debug 1676975763.891s] GitHubRepository> Fetch pull request 118 - done
    [Debug 1676975763.893s] GitHubRepository> Fetch pull request 118 - done
    [Debug 1676975763.915s] Review> Fetching pull request data
    [Debug 1676975763.916s] PullRequestModel> Fetch file changes, base, head and merge base of PR #118 - enter
    [Debug 1676975763.916s] PullRequestTree> Adding PR #118 to tree
    [Debug 1676975763.918s] GitHubRepository> Fetch metadata - enter
    [Debug 1676975763.918s] IssueModel> Fetch viewers latest review commit
    [Debug 1676975763.918s] RateLimit> API call count: 136 (/repos/{owner}/{repo})
    [Debug 1676975763.919s] RateLimit> API call count: 137 (LatestReviewCommit)
    [Debug 1676975763.936s] GitHubRepository> Fetch all pull requests - enter
    [Debug 1676975763.936s] RateLimit> API call count: 138 (/repos/{owner}/{repo}/pulls)
    [Debug 1676975764.141s] Review> register comments provider
    [Debug 1676975764.143s] Review> display pull request status bar indicator and refresh pull request tree view.
    [Debug 1676975764.144s] Review> using focus mode = true.
    [Debug 1676975764.144s] Review> state validation silent = true.
    [Debug 1676975764.144s] Review> PR show should show = false.
    [Debug 1676975764.179s] GitHubRepository> Fetch all pull requests - enter
    [Debug 1676975764.179s] RateLimit> API call count: 139 (/repos/{owner}/{repo}/pulls)
    [Debug 1676975764.333s] RateLimit> Rate limit remaining: 4909
    [Debug 1676975764.334s] RateLimit> API call count: 140 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975764.334s] RateLimit> API call count: 141 (LatestReviews)
    [Debug 1676975764.37s] RateLimit> Rate limit remaining: 4910
    [Debug 1676975764.39s] RateLimit> Rate limit remaining: 4907
    [Debug 1676975764.391s] RateLimit> Rate limit remaining: 4904
    [Debug 1676975764.391s] GitHubRepository> Fetch metadata user/repo - done
    [Debug 1676975764.392s] GitHubRepository> Fetch metadata - enter
    [Debug 1676975764.392s] GitHubRepository> Fetch metadata user/repo - done
    [Debug 1676975764.394s] RateLimit> Rate limit remaining: 4906
    [Debug 1676975764.395s] RateLimit> API call count: 142 (/repos/{owner}/{repo}/compare/{base}...{head})
    [Debug 1676975764.417s] RateLimit> Rate limit remaining: 4908
    [Debug 1676975764.417s] RateLimit> API call count: 143 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975764.417s] RateLimit> API call count: 144 (LatestReviews)
    [Debug 1676975764.914s] RateLimit> Rate limit remaining: 4902
    [Debug 1676975764.916s] RateLimit> Rate limit remaining: 4903
    [Debug 1676975764.916s] GitHubRepository> Fetch all pull requests - done
    [Debug 1676975764.917s] RateLimit> API call count: 145 (GetChecks)
    [Debug 1676975764.918s] RateLimit> API call count: 146 (GetChecks)
    [Debug 1676975764.918s] RateLimit> API call count: 147 (GetChecks)
    [Debug 1676975764.918s] RateLimit> API call count: 148 (GetChecks)
    [Debug 1676975764.979s] RateLimit> Rate limit remaining: 4901
    [Debug 1676975764.979s] GitHubRepository> Fetch all pull requests - done
    [Debug 1676975764.981s] RateLimit> API call count: 149 (GetChecks)
    [Debug 1676975764.981s] RateLimit> API call count: 150 (GetChecks)
    [Debug 1676975764.981s] RateLimit> API call count: 151 (GetChecks)
    [Debug 1676975764.981s] RateLimit> API call count: 152 (GetChecks)
    [Debug 1676975765.287s] RateLimit> Rate limit remaining: 4905
    [Debug 1676975765.287s] RateLimit> Rate limit remaining: 4900
    [Debug 1676975765.291s] RateLimit> Rate limit remaining: 4904
    [Debug 1676975765.314s] RateLimit> Rate limit remaining: 4899
    [Debug 1676975765.314s] PullRequestModel> Fetch file changes and merge base of PR #118 - done, total files 6 
    [Debug 1676975765.439s] RateLimit> API call count: 153 (PullRequestComments)
    [Debug 1676975765.44s] RateLimit> API call count: 154 (PullRequestComments)
    [Debug 1676975765.441s] RateLimit> API call count: 155 (PullRequestFiles)
    [Debug 1676975765.442s] RateLimit> API call count: 156 (GetPendingReviewId)
    [Debug 1676975765.665s] ReviewCommentController> Providing 1 commenting ranges for test_pagination.py.
    [Debug 1676975765.666s] ReviewCommentController> Providing 1 commenting ranges for test_pagination.py.
    [Debug 1676975765.667s] RateLimit> Rate limit remaining: 4902
    [Debug 1676975765.667s] RateLimit> Rate limit remaining: 4902
    [Debug 1676975765.668s] RateLimit> Rate limit remaining: 4903
    [Debug 1676975765.668s] RateLimit> Rate limit remaining: 4903
    [Debug 1676975765.668s] RateLimit> API call count: 157 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.668s] RateLimit> API call count: 158 (LatestReviews)
    [Debug 1676975765.669s] RateLimit> API call count: 159 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.669s] RateLimit> API call count: 160 (LatestReviews)
    [Debug 1676975765.716s] RateLimit> Rate limit remaining: 4901
    [Debug 1676975765.716s] RateLimit> Rate limit remaining: 4901
    [Debug 1676975765.716s] RateLimit> API call count: 161 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.716s] RateLimit> API call count: 162 (LatestReviews)
    [Debug 1676975765.717s] RateLimit> API call count: 163 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.717s] RateLimit> API call count: 164 (LatestReviews)
    [Debug 1676975765.764s] RateLimit> Rate limit remaining: 4900
    [Debug 1676975765.764s] RateLimit> Rate limit remaining: 4900
    [Debug 1676975765.764s] RateLimit> API call count: 165 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.764s] RateLimit> API call count: 166 (LatestReviews)
    [Debug 1676975765.765s] RateLimit> API call count: 167 (/repos/{owner}/{repo}/branches/{branch})
    [Debug 1676975765.765s] RateLimit> API call count: 168 (LatestReviews)
    [Debug 1676975766.084s] RateLimit> Rate limit remaining: 4897
    [Debug 1676975766.087s] RateLimit> Rate limit remaining: 4899
    [Debug 1676975766.128s] RateLimit> Rate limit remaining: 4898
    [Debug 1676975766.129s] RateLimit> Rate limit remaining: 4896
    [Debug 1676975766.131s] RateLimit> Rate limit remaining: 4897
    [Debug 1676975766.137s] RateLimit> Rate limit remaining: 4896
    [Debug 1676975766.137s] RateLimit> Rate limit remaining: 4896
    [Debug 1676975766.141s] RateLimit> Rate limit remaining: 4895
    [Debug 1676975766.153s] RateLimit> Rate limit remaining: 4894
    [Debug 1676975766.161s] RateLimit> Rate limit remaining: 4895
    [Debug 1676975766.161s] RateLimit> Rate limit remaining: 4895
    [Debug 1676975766.171s] RateLimit> Rate limit remaining: 4894
    [Debug 1676975766.171s] RateLimit> Rate limit remaining: 4894
    [Debug 1676975766.234s] RateLimit> Rate limit remaining: 4893
    [Debug 1676975766.314s] RateLimit> Rate limit remaining: 4898
    [Debug 1676975766.314s] RateLimit> Rate limit remaining: 4898
    [Debug 1676975820.731s] RateLimit> API call count: 169 (/notifications)
    [Debug 1676975821.106s] RateLimit> Rate limit remaining: 4892
    [Debug 1676975880.732s] RateLimit> API call count: 170 (/notifications)
    [Debug 1676975881.104s] RateLimit> Rate limit remaining: 4891
    [Debug 1676975940.732s] RateLimit> API call count: 171 (/notifications)
    [Debug 1676975941.097s] RateLimit> Rate limit remaining: 4890
    [Debug 1676976000.734s] RateLimit> API call count: 172 (/notifications)
    [Debug 1676976001.319s] RateLimit> Rate limit remaining: 4889
    [Debug 1676976060.737s] RateLimit> API call count: 173 (/notifications)
    [Debug 1676976060.79s] GitHubRepository> Fetch pull request 118 - enter
    [Debug 1676976060.79s] RateLimit> API call count: 174 (PullRequest)
    [Debug 1676976061.098s] RateLimit> Rate limit remaining: 4888
    [Debug 1676976061.467s] RateLimit> Rate limit remaining: 4893
    [Debug 1676976061.467s] GitHubRepository> Fetch pull request 118 - done
    [Debug 1676976061.467s] PullRequestModel> Fetch file changes, base, head and merge base of PR #118 - enter
    [Debug 1676976061.467s] IssueModel> Fetch viewers latest review commit
    [Debug 1676976061.467s] RateLimit> API call count: 175 (LatestReviewCommit)
    [Debug 1676976062.016s] RateLimit> Rate limit remaining: 4892
    [Debug 1676976062.016s] RateLimit> API call count: 176 (/repos/{owner}/{repo}/compare/{base}...{head})
    [Debug 1676976062.521s] RateLimit> Rate limit remaining: 4887
    [Debug 1676976062.521s] PullRequestModel> Fetch file changes and merge base of PR #118 - done, total files 6 
    [Debug 1676976062.587s] RateLimit> API call count: 177 (PullRequestComments)
    [Debug 1676976062.588s] RateLimit> API call count: 178 (PullRequestComments)
    [Debug 1676976062.588s] RateLimit> API call count: 179 (PullRequestFiles)
    [Debug 1676976062.99s] RateLimit> Rate limit remaining: 4890
    [Debug 1676976063.236s] RateLimit> Rate limit remaining: 4891
    [Debug 1676976063.236s] RateLimit> Rate limit remaining: 4891
    [Debug 1676976063.238s] RateLimit> API call count: 180 (GetPendingReviewId)
    [Debug 1676976063.556s] RateLimit> Rate limit remaining: 4889
    [Debug 1676976120.737s] RateLimit> API call count: 181 (/notifications)
    [Debug 1676976121.098s] RateLimit> Rate limit remaining: 4886
    [Debug 1676976154.532s] Authentication> GitHub Enterprise provider selected without URI.
    [Debug 1676976156.854s] RateLimit> API call count: 182 (Viewer)
    [Debug 1676976157.101s] RateLimit> Rate limit remaining: 4888
    

    The "GitHub Enterprise provider selected without URI." log line was triggered by me hitting the "Sign In" button in the side bar (not "Sign In with GHE". I tripple checked

  2. added
    bugIssue identified by VS Code Team member as probable bug
    on Feb 21, 2023
  3. alexr00 commented on Feb 21, 2023

    @alexr00
    Member

    We get repository info from the built in git extension, including the push and fetch URLs. I've opened microsoft/vscode#174941 to see if we can fix this upstream.

  4. TAREKKAPSA commented on Oct 13, 2025

    @TAREKKAPSA
  5. TAREKKAPSA commented on Oct 13, 2025

    @TAREKKAPSA
  6. alexr00 commented on Dec 18, 2025

    @alexr00
    Member

    This will be available in the next pre-release version of the extension. There might be some gaps still, so please post if you see issues!

  7. modified the milestones: Backlog, on Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugupstream/vscodeverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions