Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHubTokenExchangeError when trying to connect with Github via VS code (Error 403) #169272

Closed
spaz88 opened this issue Dec 15, 2022 · 4 comments
Closed
Assignees

Comments

@spaz88
Copy link

spaz88 commented Dec 15, 2022

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.74.1
  • OS Version: Windows 10 21H2

Steps to Reproduce:

  1. Try to connect to Github via the profile menu
    Capture

  2. Github pop up appear
    image

3.Github login window opens
image

  1. Get GitHubTokenExchangeError
    image

  2. Same thing if i try with "Different way"

I am working behind a corporate proxy that is properly configured in my gitconfig and my VS Code. After i made researches it may be my proxy that is blocking the reception of the token but there is no problem when doing push and pull requests.

Full logs:
2022-12-15 16:04:22.359 [info] Reading sessions from keychain...
2022-12-15 16:04:22.360 [info] Getting sessions for user:email...
2022-12-15 16:04:22.360 [info] Got 0 sessions for user:email...
2022-12-15 16:04:22.362 [info] Getting sessions for all scopes...
2022-12-15 16:04:22.362 [info] Got 0 sessions for ...
2022-12-15 16:04:27.051 [info] Getting sessions for read:user...
2022-12-15 16:04:27.051 [info] Got 0 sessions for read:user...
2022-12-15 16:04:27.152 [info] Getting sessions for read:user,repo,user:email,workflow...
2022-12-15 16:04:27.153 [info] Got 0 sessions for read:user,repo,user:email,workflow...
2022-12-15 16:04:27.427 [info] Getting sessions for read:user,repo,user:email...
2022-12-15 16:04:27.427 [info] Got 0 sessions for read:user,repo,user:email...
2022-12-15 16:04:31.697 [info] Getting sessions for read:user...
2022-12-15 16:04:31.697 [info] Got 0 sessions for read:user...
2022-12-15 16:05:03.334 [info] Logging in for the following scopes: read:user
2022-12-15 16:05:03.346 [info] Trying without local server... (read:user)
2022-12-15 16:06:05.219 [info] Exchanging code for token...
2022-12-15 16:06:05.289 [error] GitHubTokenExchangeError: <html><title>Cannot load block message</title>Status Code: 403'<br>MainBlockTemplate = 'index.html'<br>BlockMessage = 'authenticationrequired.html'</html> at t.GitHubServer.u (c:\Users\shby5041\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\github-authentication\dist\extension.js:2:1309015) at processTicksAndRejections (node:internal/process/task_queues:96:5) at c:\Users\shby5041\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\github-authentication\dist\extension.js:2:1304423

Excuses me for any duplicates

@ttran0789
Copy link

Did you get this fixed?

@chrmarti chrmarti assigned TylerLeonhardt and unassigned chrmarti Feb 23, 2023
@spaz88
Copy link
Author

spaz88 commented Feb 28, 2023

No unfortunately.

@ttran0789
Copy link

@spaz88 I had a similar situation and had it fixed. I had a corporate proxy so it could never make the connection - ended up making the change in VS Code. Are you using a proxy?

@chrmarti
Copy link
Contributor

chrmarti commented Mar 1, 2023

Your proxy seems to require authentication. Support for that is currently incomplete. Please see #12588 (comment). Tracking there, thanks.

@chrmarti chrmarti closed this as completed Mar 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants