github login failed every time
Type: Bug
The login step in browser is good, and successfull, but when redirect to vscode, vscode can also recive the redirect request, because it will pop up a window to ask me if allow it, but after that, it stuck until timeout
VS Code version: Code 1.71.0 (784b0177c56c607789f9638da7b6bf3230d47a8c, 2022-09-01T07:36:10.600Z) OS version: Windows_NT x64 10.0.22000 Modes: Sandboxed: No Remote OS version: Linux x64 3.10.0-1127.19.1.el7.x86_64
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 x 3300) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.91GB (24.16GB free) |
| Process Argv | --crash-reporter-id a72f7270-60dd-4eec-8d30-1feb1135c48c |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: 阿里云 |
| OS | Linux x64 3.10.0-1127.19.1.el7.x86_64 |
| CPUs | Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz (2 x 2499) |
| Memory (System) | 7.64GB (4.40GB free) |
| VM | 25% |
Extensions (11)
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-docker | ms- | 1.22.1 |
| vscode-language-pack-zh-hans | MS- | 1.71.9070915 |
| python | ms- | 2022.14.0 |
| vscode-pylance | ms- | 2022.9.10 |
| jupyter | ms- | 2022.8.1002431955 |
| jupyter-keymap | ms- | 1.0.0 |
| jupyter-renderers | ms- | 1.0.9 |
| remote-ssh | ms- | 0.84.0 |
| remote-ssh-edit | ms- | 0.80.0 |
| remote-wsl | ms- | 0.66.3 |
| vim | vsc | 1.23.2 |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
pylanb8912:30545647
vsclangdf:30486550
c4g48928:30535728
hb751961:30553087
dsvsc012:30540252
azure-dev_surveyone:30548225
i497e931:30553904
And I have tried win11, win10, MACOS, also with proxy or not with proxy, nothing helped
Any update ?
Sorry could you attach a video or a gif? That would really help me understand what you're seeing.
/gifPlease
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.
If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette).
Happy coding!
How do I make y'all stop sending me emails. I don't even do git hub
On Fri, Sep 16, 2022, 10:28 PM VSCode Triage Bot @.***> wrote:
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.
If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette).
Happy coding!
— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/160649#issuecomment-1249988436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXGLKFLPWU64DHSPYDGR2A3V6U3FTANCNFSM6AAAAAAQJZIYBE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
/gif
sorry for the gif delay
can you provide the contents of the GitHub Authentication output pane:

And also anything that shows up in Dev Tools:
- ctrl + shift + P
- "Dev Tools"
can you provide the contents of the GitHub Authentication output pane:
And also anything that shows up in Dev Tools:
- ctrl + shift + P
- "Dev Tools"
Nothing else
Very interesting... you see the spinning sign in to github.com... in your status bar... can you click on that and click cancel and then it'll ask you via a notification if you want to try logging in a different way... can you try that? Let me know if you need a video to understand what I'm talking about.
Very interesting... you see the spinning
sign in to github.com...in your status bar... can you click on that and click cancel and then it'll ask you via a notification if you want to try logging in a different way... can you try that? Let me know if you need a video to understand what I'm talking about.
Already tried so many times, here is the result 
Very interesting... you see the spinning
sign in to github.com...in your status bar... can you click on that and click cancel and then it'll ask you via a notification if you want to try logging in a different way... can you try that? Let me know if you need a video to understand what I'm talking about.
Hi, any update? This problem keeps me can't use the codepolit actually, and I really really want to try...
Very interesting... you see the spinning
sign in to github.com...in your status bar... can you click on that and click cancel and then it'll ask you via a notification if you want to try logging in a different way... can you try that? Let me know if you need a video to understand what I'm talking about.
Hi, is there any update?
@tsgsz let's try to get you unblocked first... can you open up Windows Credential Manager and go to Windows Credentials

Then look for any credentials that start with vscode and delete them. Then try logging in again.
@tsgsz let's try to get you unblocked first... can you open up Windows Credential Manager and go to Windows Credentials
Then look for any credentials that start with
vscodeand delete them. Then try logging in again
There is no credentials that start with vscode, I delete all of the rest credentials and loggin again, the result is all the same.
I really don't think it's the credential problem, because couple of days ago, I try it in my mac, didn't work either, and my windows also resinstalled once, nerver work.
Let's see if this is a keytar issue then... first log in in vscode (even though it fails)
if you have nodejs installed, you can run this simple one-liner to see if the problem is how your keychain is setup:
npx @emacs-grammarly/keytar-cli find-creds -s vscodevscode.github-authentication
or if you're on Insiders:
npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication
This is using the following open source package: https://github.com/emacs-grammarly/keytar-cli
What you should get is something like this:
[
{
account: 'github.auth',
password: '....... longggg string ......'
}
]
NOTE: on macOS I got a system prompt to allow this process to access the keychain... that may or may not be the case for you
Additionally, we can see if we can properly set passwords:
npx @emacs-grammarly/keytar-cli set-pass testingvscode testingvscode testingvscode
and then
npx @emacs-grammarly/keytar-cli find-creds -s testingvscode
should give us that newly created password.
Let's see if this is a keytar issue then... first log in in vscode (even though it fails)
if you have nodejs installed, you can run this simple one-liner to see if the problem is how your keychain is setup:
npx @emacs-grammarly/keytar-cli find-creds -s vscodevscode.github-authenticationor if you're on Insiders:
npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authenticationThis is using the following open source package: https://github.com/emacs-grammarly/keytar-cli
What you should get is something like this:
[ { account: 'github.auth', password: '....... longggg string ......' } ]NOTE: on macOS I got a system prompt to allow this process to access the keychain... that may or may not be the case for you
Additionally, we can see if we can properly set passwords:
npx @emacs-grammarly/keytar-cli set-pass testingvscode testingvscode testingvscodeand then
npx @emacs-grammarly/keytar-cli find-creds -s testingvscodeshould give us that newly created password.
npx @emacs-grammarly/keytar-cli find-creds -s vscodevscode.github-authentication this return "[]"
npx @emacs-grammarly/keytar-cli set-pass testingvscode testingvscode testingvscode this is normal
and I manually set vscodevscode.github-authentication using the set-pass command, the output keytar is ok, just vsocde still can't login
My friend, any clue?
Hi, is there anyone still working on this issue?
I just got back from vacation and am juggling multiple items. This issue hasn't been forgotten
I just got back from vacation and am juggling multiple items. This issue hasn't been forgotten
thanks
@tsgsz can you run these two lines in PowerShell and tell me what you get?
Invoke-RestMethod -Method Post https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token
Invoke-RestMethod -Method Post https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token -Body 'code=123'
They will fail, but I want to make sure you at least get a response from the server
result as follow:

the text version: Invoke-RestMethod : No code property provided in body
- Invoke-RestMethod -Method Post https://vscode.dev/codeExchangeProxyEn ...
-
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod],WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Invoke-RestMethod : bad_verification_code: The code passed is incorrect or expired. (https://docs.github.com/apps/managing-oauth-apps/troubleshooting-oauth-app-access-token-request-errors/#bad-verification-code)
- Invoke-RestMethod -Method Post https://vscode.dev/codeExchangeProxyEn ...
-
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod],WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
knock knock
Believe it or not, but I was on another vacation. I'm back now... til the holidays... so hopefully we can make some progress here.
It's good that PowerShell was able to make a request to these urls... that's worth something. Though, to be honest, I'm not sure why VS Code would be having trouble here.
Do you have any proxies applied to your machine by your organization?
One thing we could try... have you used Fiddler before? Fiddler can be used to see if the request to vscode.dev/codeExchangeProxyEnd..... actually finishes. By installing that, and running it, it should start listening to the traffic that your machine makes and print it out:

Hi,
I've just read the full issue and I have the exact same issue.
I'm using ssh keys to login to github, this works everywhere except in vscode.

It does popup the browser login window

But clicking signing with browser just goes to a blank localhost page most of the time, once it did show me a successfully login you can go back to the app, but in vscode it was still complaining.
npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication
Returns
[
{
account: 'github.auth',
password: 'AQxlmzCMdedeFgtEgtjogfetgwt/lfsAefgAgteagt3geugtYerSgetOYrDD\n' +
'Blablablabal(removed)'
}
]
And this is Github Auth Log:

This only happens on my windows machine and funny to note that while trying to solve this, every single commits had a different user... not sure why but it might be related:

That doesn't seem to be related. VS Code does not open those popups. My guess is that Git Credential Manager or your shell does. I got a new issue going for you.
Sorry for the late reply, got sick for sometime, covid, I've got a new situation, my last computer naturally ok for days ago(I've done nothing, and no update), but my new mac can't login, exactly the same behavior, which remind me maybe there is some token or other thing time related?
Hey @tsgsz, hope you're feeling better. COVID sucks. For macOS, how did you install it. Could you record a video of you going through the flows? I'd love it if you could try the fallback flows to see if any work for you.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
I have 2 macs, one is new, so I can't use setting sync and code pilot, but one is old, it use to login successfully in setting sync, but now can't login with pilot, which looks like this
This is interesting now, I have 3 computers, 2 mac, 1 pc, pc now can do everything(I did nothing actually, it just became fine one day), one mac can sync settings but no code pilot, one mac can do nothing...
sorry for the gif delay