Failure to authenticate and load PRs and Issues in GitHub Enterprise
Creating a new issue from https://github.com/microsoft/vscode-pull-request-github/issues/3371#issuecomment-1253800533. I tested GitHub Enterprise support this morning with VSCode Insiders and still was not able to sign in with GitHub Enterprise.
Background info:
- Extension version:
v0.51.2022092110 - VSCode Insiders version:
1.72.0-insider (Universal), Commit: 333754f29b719f605904f072b13c054c2231b9bd - GHES version:
3.3.3 - OS, Arch:
MacOS 12.6,M1 - Settings (host name redacted)
"github-enterprise.uri": "https://github.host.com/", "githubPullRequests.logLevel": "debug",
Steps to Reproduce:
- Loaded Insiders. I only see a prompt for GitHub auth flow and not for GitHub Enterprise auth flow.
- Go through GitHub auth and login. Cancelling login does not show the GitHub Enterprise auth flow, only a successful login to GitHub does. logout after initial login.
- Immediately logging out of GitHub auth or proceeding straight to GitHub Enterprise auth flow seems to make no difference in subsequent steps.
- Go through GitHub Enterprise auth flows.
- OAuth browser flow fails.
- Local server flow fails.
- Device activation succeeds.
- The extension still fails to properly load PRs and issues
From these steps and the logs below, I noticed some things
- VSCode does not understand that I only want to login to GHES. I have to go through the GitHub flow directly first for GitHub Enterprise auth flow to show. This might be the source of the issue?
- It looks like the GitHub Enterprise auth tries to load two different sessions, one with and one without
workflowscope. The one withoutworkflowscope is found but the one withworkflowscope is not found. See full logs below for more details.[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Got 1 verified sessions. [2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email,workflow... [2022-09-21 11:20:02.419] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email... [2022-09-21 11:20:02.419] [GitHub Enterprise Authentication] [info] Got 1 sessions for read:user,repo,user:email... - Do I need to manually clear the keychain on the OS somehow? Could prior login attempts be conflicting there?
Additional log details for the authentication extension logs:
Log (GitHub Enterprise Authentication)
[2022-09-21 11:19:19.414] [GitHub Enterprise Authentication] [info] Getting sessions for all scopes...
[2022-09-21 11:19:19.414] [GitHub Enterprise Authentication] [info] Got 0 sessions for ...
[2022-09-21 11:19:24.036] [GitHub Enterprise Authentication] [info] Reading sessions from keychain...
[2022-09-21 11:19:24.041] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:19:24.049] [GitHub Enterprise Authentication] [info] Got stored sessions!
[2022-09-21 11:19:24.049] [GitHub Enterprise Authentication] [info] Got 0 verified sessions.
[2022-09-21 11:19:24.049] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:19:24.052] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email...
[2022-09-21 11:19:24.052] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email...
[2022-09-21 11:19:24.053] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:19:24.053] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:19:24.071] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email...
[2022-09-21 11:19:24.071] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email...
[2022-09-21 11:19:24.788] [GitHub Enterprise Authentication] [info] Getting sessions for all scopes...
[2022-09-21 11:19:24.788] [GitHub Enterprise Authentication] [info] Got 0 sessions for ...
[2022-09-21 11:19:28.631] [GitHub Enterprise Authentication] [info] Logging in for the following scopes: read:user repo user:email
[2022-09-21 11:19:28.633] [GitHub Enterprise Authentication] [info] Trying without local server... (read:user repo user:email)
[2022-09-21 11:19:34.770] [GitHub Enterprise Authentication] [info] Exchanging code for token...
[2022-09-21 11:19:35.761] [GitHub Enterprise Authentication] [error] GitHubTokenExchangeError: Internal Server Error
at v.exchangeCodeForToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:1:716366)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:1:711948
[2022-09-21 11:19:42.690] [GitHub Enterprise Authentication] [info] Trying with local server... (read:user repo user:email)
[2022-09-21 11:19:43.976] [GitHub Enterprise Authentication] [info] Exchanging code for token...
[2022-09-21 11:19:44.993] [GitHub Enterprise Authentication] [error] GitHubTokenExchangeError: Internal Server Error
at v.exchangeCodeForToken (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:1:716366)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:1:713109
[2022-09-21 11:19:47.356] [GitHub Enterprise Authentication] [info] Trying device code flow... (read:user repo user:email)
[2022-09-21 11:20:01.639] [GitHub Enterprise Authentication] [info] Getting user info...
[2022-09-21 11:20:02.306] [GitHub Enterprise Authentication] [info] Got account info!
[2022-09-21 11:20:02.312] [GitHub Enterprise Authentication] [info] Storing 1 sessions...
[2022-09-21 11:20:02.384] [GitHub Enterprise Authentication] [info] Reading sessions from keychain...
[2022-09-21 11:20:02.384] [GitHub Enterprise Authentication] [info] Stored 1 sessions!
[2022-09-21 11:20:02.384] [GitHub Enterprise Authentication] [info] Login success!
[2022-09-21 11:20:02.416] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Token acquired from secret storage.
[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Got stored sessions!
[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Read the following session from the keychain with the following scopes: read:user repo user:email
[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Got 1 verified sessions.
[2022-09-21 11:20:02.418] [GitHub Enterprise Authentication] [info] Got 0 sessions for read:user,repo,user:email,workflow...
[2022-09-21 11:20:02.419] [GitHub Enterprise Authentication] [info] Getting sessions for read:user,repo,user:email...
[2022-09-21 11:20:02.419] [GitHub Enterprise Authentication] [info] Got 1 sessions for read:user,repo,user:email...
GitHub Pull Request
[Debug 1663773968.476s] RateLimit> API call count: 17 (/user)
[Debug 1663773968.481s] RateLimit> API call count: 18 (/user)
[Debug 1663773968.901s] RateLimit> Rate limit remaining: 4982
[Debug 1663773968.906s] RateLimit> API call count: 19 (/user)
[Debug 1663773969.04s] RateLimit> Rate limit remaining: 4981
[Debug 1663773969.04s] RateLimit> API call count: 18 (/user)
[Debug 1663773969.227s] RateLimit> Rate limit remaining: 4980
[Debug 1663773969.229s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1663773969.229s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1663773969.23s] No GitHub remotes found
[Debug 1663773969.24s] Authentication> No GitHub Enterprise token found.
[Debug 1663773969.24s] Review> Queuing additional validate state
[Debug 1663773969.24s] Review> Validating state...
[Debug 1663773969.241s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1663773969.241s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1663773969.271s] No GitHub remotes found
[Debug 1663773969.315s] Review> no matching pull request metadata found for current branch <branch>
[Debug 1663773969.315s] Review> no matching pull request metadata found on GitHub for current branch <branch>
[Debug 1663773969.315s] PullRequestTree> Removing PR #undefined from tree
[Debug 1663773969.353s] RateLimit> Rate limit remaining: 4979
[Debug 1663773969.353s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1663773969.353s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1663773969.353s] No GitHub remotes found
[Debug 1663774029.682s] RateLimit> API call count: 19 (/user)
[Debug 1663774030.116s] RateLimit> Rate limit remaining: 179986
[Debug 1663774030.12s] RateLimit> API call count: 20 (/user)
[Debug 1663774030.61s] RateLimit> Rate limit remaining: 179985
[Debug 1663774030.627s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1663774030.627s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1663774030.637s] No GitHub remotes found
Looking at the log output, I'm guessing this is the issue:
Trying device code flow... (read:user repo user:email)
It looks like the device code flow is missing the workflow scope, and the other two auth flows don't work with my GHES instance.
EDIT: Actually, it looks like all auth flows are trying to login without workflow scope. Not sure if that is intended or not.
Sorry for the delay in responding to this!
I have to go through the GitHub flow directly first for GitHub Enterprise auth flow to show.
You might need to wait 5 seconds before signing in, but you should get taken directly to the GitHub Enterprise auth flow. The delay comes from this extension waiting for the git extension to provide some information. I'll see if I can wait to show the button until we've reached that point. We were also falling back to a github.com login in the enterprise login didn't work. I'm removing that fallback when we are very sure that the open repo is enterprise.
Actually, it looks like all auth flows are trying to login without workflow scope. Not sure if that is intended or not.
We updated our scopes to include workflow 5 months ago. To make it easier on our users, we continue to accept logins that were missing workflow. For this reason you will see some logs that don't contain the workflow scope. You should never actually be prompted to log in without the workflow scope though, which leads me to:
The extension still fails to properly load PRs and issues
I haven't been able to reproduce this issue. Are you using an official VS Code build? There are quirks in auth for unofficial builds, so knowing whether you're using an official build will help narrow down the issue.
You might need to wait 5 seconds before signing in, but you should get taken directly to the GitHub Enterprise auth flow. The delay comes from this extension waiting for the git extension to provide some information.
I never get the auth flow for GHES at all, regardless of wait time, unless first going through GitHub auth flow.
We updated our scopes to include
workflow5 months ago. To make it easier on our users, we continue to accept logins that were missingworkflow. For this reason you will see some logs that don't contain theworkflowscope. You should never actually be prompted to log in without theworkflowscope though
:+1:
I haven't been able to reproduce this issue. Are you using an official VS Code build? There are quirks in auth for unofficial builds, so knowing whether you're using an official build will help narrow down the issue.
I'm testing with the official VSCode pre release version (1.72.0-insider specifically) as you suggested in some of the other GHES issues. Hope that helps!
I can also try a fresh nightly install and retrying if that might help?
There do seem to be issues authenticating with the first two options for the GHES flow. Not sure if that's specific to our GHES instance, the version we're running, or something else.
At the bottom of the activity bar (by default the bottom left corner of VS Code) there's an "Accounts" icon. Can you try signing out of your GitHub Enterprise account from there, reload the window, then sign back in using the "Sign in" button in GitHub view?
Can you try signing out of your GitHub Enterprise account from there, reload the window, then sign back in using the "Sign in" button in GitHub view?
Just tried that. It still defaults to logging into GitHub from the GitHub view "Sign in" button. Signing in to github.com... and opens a github.com link in the browser. GitHub Enterprise authentication never triggers.
Same results on the latest version of Insiders (Version: 1.72.0-insider (Universal) Commit: bcb6c9b7e0e795bdf65ea440025d204060e4bfc8)
One more question about your setup then: Do you have a folder open in VS Code that contains a git repo with GitHub Enterprise remotes?
Can you grab logs by doing the following:
- Set
"githubPullRequests.logLevel": "debug" - Reload your window
- Try to log in
- Share the output from GitHub Pull Requests
Do you have a folder open in VS Code that contains a git repo with GitHub Enterprise remotes?
Yep, here's what git remote -v gives me from terminal in this workspace. I use a PAT to auth from git to our GitHub Enterprise instance.
$ git remote -v
origin https://github.host.com/org/repo.git (fetch)
origin https://github.host.com/org/repo.git (push)
Can you grab logs by doing the following
Grabbed some log snippets at a few different spots in the flow. Let me know if I can pull any additional info or if there's any additional logging or debugging I should enable (might be helpful to see additional info for the failing auth requests, for example).
Output from GitHub Pull Requests (before logging in with GitHub Enterprise auth flow)
[Debug 1664824074.123s] RateLimit> API call count: 11 (/user)
[Debug 1664824074.133s] RateLimit> API call count: 12 (/user)
[Debug 1664824074.148s] RateLimit> API call count: 13 (/user)
[Debug 1664824074.207s] Authentication> No GitHub Enterprise token found.
[Debug 1664824074.506s] RateLimit> Rate limit remaining: 4988
[Debug 1664824074.506s] RateLimit> API call count: 14 (/user)
[Debug 1664824074.839s] RateLimit> Rate limit remaining: 4987
[Debug 1664824074.839s] RateLimit> API call count: 13 (/user)
[Debug 1664824074.931s] RateLimit> Rate limit remaining: 4984
[Debug 1664824074.932s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824074.933s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824074.933s] No GitHub remotes found
[Debug 1664824074.933s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824075.07s] RateLimit> Rate limit remaining: 4985
[Debug 1664824075.07s] RateLimit> API call count: 12 (/user)
[Debug 1664824075.212s] RateLimit> Rate limit remaining: 4983
[Debug 1664824075.213s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824075.213s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824075.214s] No GitHub remotes found
[Debug 1664824075.214s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824075.216s] Authentication> No GitHub Enterprise token found.
[Debug 1664824075.216s] Review> Queuing additional validate state
[Debug 1664824075.216s] Review> Validating state...
[Debug 1664824075.216s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824075.216s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824075.304s] No GitHub remotes found
[Debug 1664824075.305s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824075.466s] RateLimit> Rate limit remaining: 4982
[Debug 1664824075.468s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824075.468s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824075.483s] Review> no matching pull request metadata found for current branch <branch>
[Debug 1664824075.483s] Review> no matching pull request metadata found on GitHub for current branch <branch>
[Debug 1664824075.483s] PullRequestTree> Removing PR #undefined from tree
[Debug 1664824075.507s] No GitHub remotes found
[Debug 1664824075.507s] GitPostCommitCommands> Trying to register post commit commands.
Output from GitHub Pull Requests (after logging in with GitHub Enterprise auth flow)
[Debug 1664824226.012s] RateLimit> API call count: 13 (/user)
[Debug 1664824226.622s] RateLimit> Rate limit remaining: 4981
[Debug 1664824226.622s] RateLimit> API call count: 14 (/user)
[Debug 1664824226.921s] RateLimit> Rate limit remaining: 4980
[Debug 1664824226.936s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824226.936s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824226.938s] No GitHub remotes found
[Debug 1664824226.938s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824264.837s] RateLimit> API call count: 15 (/user)
[Debug 1664824265.075s] RateLimit> Rate limit remaining: 179994
[Debug 1664824265.075s] RateLimit> API call count: 16 (/user)
[Debug 1664824265.273s] RateLimit> Rate limit remaining: 179993
[Debug 1664824265.274s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824265.274s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824265.276s] No GitHub remotes found
[Debug 1664824265.276s] GitPostCommitCommands> Trying to register post commit commands.
Output from GitHub Pull Requests (after force logging out of GitHub auth flow)
[Debug 1664824310.461s] Authentication> No GitHub token found.
[Debug 1664824310.465s] RateLimit> API call count: 17 (/user)
[Debug 1664824310.702s] RateLimit> Rate limit remaining: 179992
[Debug 1664824310.702s] RateLimit> API call count: 18 (/user)
[Debug 1664824310.885s] RateLimit> Rate limit remaining: 179991
[Debug 1664824310.901s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824310.901s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824310.901s] Review> Queuing additional validate state
[Debug 1664824310.901s] Review> Validating state...
[Debug 1664824310.932s] No GitHub remotes found
[Debug 1664824310.932s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824310.943s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824310.943s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824310.965s] No GitHub remotes found
[Debug 1664824310.965s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824311.029s] Review> no matching pull request metadata found for current branch <branch>
[Debug 1664824311.029s] Review> no matching pull request metadata found on GitHub for current branch <branch>
[Debug 1664824311.029s] PullRequestTree> Removing PR #undefined from tree
After another window reload
[Debug 1664824381.733s] /Users/user/.ssh/config: ENOENT: no such file or directory, open '/Users/user/.ssh/config'
[Debug 1664824382.044s] Activation> Creating API implementation.
[Debug 1664824382.045s] Activation> Initializing state.
[Debug 1664824382.045s] Activation> Creating credential store.
[Debug 1664824384.048s] Authentication> No GitHub token found.
[Debug 1664824384.523s] RateLimit> API call count: 19 (/user)
[Debug 1664824384.805s] RateLimit> Rate limit remaining: 179989
[Debug 1664824384.805s] RateLimit> API call count: 20 (/user)
[Debug 1664824384.995s] RateLimit> Rate limit remaining: 179988
[Debug 1664824385s] Activation> Registering built in git provider.
[Debug 1664824385s] Registering git provider
[Debug 1664824385.002s] Activation> Registering live share git provider.
[Debug 1664824385.002s] Activation> Creating tree view.
[Debug 1664824385.021s] Looking for git repository
[Debug 1664824385.021s] Found 1 repositories during activation
[Debug 1664824385.021s] Git repository found, initializing review manager and pr tree view.
[Debug 1664824385.022s] Review> Validate state in progress
[Debug 1664824385.022s] Review> Validating state...
[Debug 1664824385.282s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824385.41s] GitHubServer> Host https://github.host.com/org/repo is associated with GitHub: 0
[Debug 1664824385.41s] No remotes found. The following remotes are missing: origin, upstream
[Debug 1664824385.41s] FolderRepositoryManager> Displaying configured remotes: origin, upstream
[Debug 1664824385.422s] No GitHub remotes found
[Debug 1664824385.422s] GitPostCommitCommands> Trying to register post commit commands.
[Debug 1664824385.46s] Review> no matching pull request metadata found for current branch <branch>
[Debug 1664824385.461s] Review> no matching pull request metadata found on GitHub for current branch <branch>
[Debug 1664824385.461s] PullRequestTree> Removing PR #undefined from tree
Ignore please, I'm tired 😅 Forgot to reopen the workspace folder after updating. Same issues on latest Insider's update just now.
~I updated to the latest Insider's version just now (1.72.0-insider (Universal) Commit: 9fb452c4852ef098206ec67a2b236ad5fd0ba828) and I no longer see a prompt to login to GitHub or GitHub Enterprise at all~
Thanks for all the logs. This seems to be the important line, which indicates that your git remote doesn't appear to be a GitHub remote:
[Debug 1664824385.41s] GitHubServer> Host https://github.host.com/org/repo is associated with GitHub: 0
In the extension, we make a request to your host then check to see if the headers in the response include x-github-request-id. This is how we tell if the git remote is actually a GitHub (enterprise or not) remote.
It looks like your enterprise server isn't responding with that header. I don't know why that might be the case. I've tested with GitHub Enterprise 3.3, and the expected headers are in the response there. If you're ok with emailing me the URL of your enterprise host, then please do and use the email in my profile. In parallel, I will add some logging for these headers so I can see if there's some other header that I should be looking for (these logging changes won't make it into the pre-release build for a few more days as we are stabilizing for release, which is why I'm also asking for the email if possible).
If you're ok with emailing me the URL of your enterprise host, then please do and use the email in my profile. In parallel, I will add some logging for these headers so I can see if there's some other header that I should be looking for (these logging changes won't make it into the pre-release build for a few more days as we are stabilizing for release, which is why I'm also asking for the email if possible).
That would be great. I'm working with our GHES team to get some additional details as well 🤞🏻
From those additional logs I can see that x-github-request-id is not included in the headers, which explains why the GitHub Enterprise flow never triggers. If I'm able to trigger it manually (given the above hacky steps), is x-github-request-id on the headers still needed for the extension to work with GHES?
Additional debug logs on the OAuth errors when authenticating might help as well, though I'm not 100% sure what additional info could be logged from the GHES error response.
@wrslatz can you share the headers that are in the response? I added the check for x-github-request-id since it seemed like a safe way to know if the server is a GitHub server, but it's possible that was a bad assumption. If that's the case, then I'll need to add a way for you to get to the enterprise auth.
@wrslatz can you share the headers that are in the response?
@alexr00 these are the headers I see from the logs
GitHubServer> All headers: cache-control, connection, content-length, content-type, www-authenticate
@wrslatz I added a fallback detection for GitHub servers. The latest pre-release build has the change. Could you please let me know if it works for you?
@wrslatz I added a fallback detection for GitHub servers. The latest pre-release build has the change. Could you please let me know if it works for you?
@alexr00 I just tested with pre-release version v0.53.2022101119 and see the same results. Login initially moves me through the public GitHub flow and I can only access the GitHub Enterprise flow after that.
The GitHub Enterprise login also still does not work once I move all the way through the flow (not sure if that is something on our GitHub Enterprise side or not). The first two methods still fail with an Internal Server Error (not sure if there's anything additional we can log there that would be helpful).
Can you paste the following in a browser URL bar, hit enter, and share what it returns?
https://your.githubenterprise.host/status
Example with GitHub.com:

Can you paste the following in a browser URL bar, hit enter, and share what it returns?
GitHub lives! (2022-10-11 22:51:38 +0000) (1)
Thanks for your patience and help with this @wrslatz. I think I found the problem. I'll let you know it's available in a pre-release build (should be tomorrow).
Tested this morning and I see an additional log message right after the headers logging that may be helpful
[Debug 1665761551.872s] GitHubServer> No response from host https://github.host.com/org/repo: Unexpected token < in JSON at position 0
Ok, seems like there's still some difference between what the server I'm testing with and the one that you're using returns. I assumed that they'd return the same unauthenticated response, but it seems that yours doesn't return a json response. I'm adding logging for the server response so we can see what your server is returning. Thanks again for persisting on this!
Looks like that response does show an auth issue
GitHubServer> Received fallback response from the server: <html><body><h1>401 Unauthorized</h1>
You need a valid user and password to access this content.
</body></html>
Thanks for sticking with this @wrslatz. It seems that your GitHub Enterprise server isn't providing any information at all that we can use to know that it's actually GitHub Enterprise. I'll need to add a separate "Sign in with GitHub Enterprise" button since it seems that there are cases where the Enterprise server is simply not configured to respond in a known way.
Thanks for sticking with this @wrslatz.
No sweat, thanks for the really helpful and quick support and testing here!
It seems that your GitHub Enterprise server isn't providing any information at all that we can use to know that it's actually GitHub Enterprise. I'll need to add a separate "Sign in with GitHub Enterprise" button since it seems that there are cases where the Enterprise server is simply not configured to respond in a known way.
I wish I could get more info about our Enterprise setup so I could pass it along. Hopefully that'll change in the future.
I'll be happy to test any additional changes here 👍🏻
New behavior: If we can't tell that the remote is github.com or GitHub Enterprise there will be a "Sign in with GitHub Enterprise" button in the GitHub view. If you choose that then we'll try to help you set up GitHub Enterprise. Sixth time's the charm 😅.
The change is available in the latest pre-release version of the extension with VS Code insiders.
It's working! On latest insiders with pre-release extension version the Sign In button correctly logs me in with GitHub Enterprise to start instead of public GitHub. From there, the third login option (device login) works. After logging in, I now see issues and PRs populating! 🚀
Thank you @alexr00 🎉 for continuing to help when I didn't have much debug info to provide.
I believe the first two auth options fail because of issues with our GitHub Enterprise setup. I'm happy to open a separate issue if you'd like to keep track of that as a potential separate issue.
Thanks for verifying that the issue is fixed!
If you feel confident the first two auth options fail because of issues with your Enterprise setup, then I don't think we need to create an issue for that. If you think that those two options should be working, then yes, please do file an issue!