code-settings-sync: Login with Github Fails, even when VSCode Launched as Admin
🐛 Describe the bug
“Login with Github” fails on Win 10 Pro, even when VS Code is launched as admin.
🌴 Visual Studio Code Version : 1.37.0 🌴 Code Settings Sync Version : 3.4.1 🌴 Standard or Insiders : Standard 🌴 Portable or Installed : Installed 🌴 OSS or Official Build : Official 🌴 Operating System : Win 10 Pro 🌴 Occurs On: Help Configuring 🌴 Proxy Enabled: No 🌴 Gist Id: Didn’t get to get that far
📰 To Reproduce Steps to reproduce the behavior:
- Open VS Code as Administrator.
- The Settings Sync page loads.
- Click on ‘Login with Github.’
- Command sent to browser with URL:
https://github.com/login/oauth/authorize?scope=gist%20read:user&client_id=cfd96460d8b110e2351b&redirect_uri=http://localhost:54321/callback - URL resolves to
http://localhost:54321/callback?code=161f703d663c9664cd9eending in error:

💪 Expected behavior I expect to be logged into GitHub and for setup to continue.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 11
- Comments: 34 (3 by maintainers)
I had a similar issue on Chromebook + crostini - i.e., I get the github auth, validate it and then the redirection to localhost:54321/callback?code=xxx fails.
The trick in that case (Chromebook/crostini specific) is to just replace “localhost” by “penguin.linux.test” (the address of the crostini VM) - works perfectly from there.
in 2021 i’m still getting this error.
I can confirm that this works perfectly well when running from a chromebook.
have same problem
Sign in failed: FetchError: request to https://vscode-auth.github.com/token?code=*****************state=754cb518-a3a4-4a33-9cc7-72488d1f5597 failed, reason: getaddrinfo ENOTFOUND vscode-auth.github.comI had this same problem, in the console it showed the error “failed, reason: certificate has expired” and in google chrome the same error of @rm-bergmann appeared. I removed some unknown certificates from my keychain and the problem was solved, apparently these blocked access. Cheers, and I hope it helps you.