vscode-pull-request-github: Unable to sign in - certificate expired error

  • Extension version: 0.13.0
  • VSCode Version: 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:57:51.166Z)
  • OS: macOS Catalina 10.15.2 (Darwin x64 19.2.0)

Steps to Reproduce:

  1. Click sign in to github
  2. Accept the browser authorization request
  3. Whether the browser activates vscode, or I copy the authorization token into the manually provide response prompt myself, it fails with these details:
  • VScode shows a notification Error signing in to github.com
  • The status bar has changed to Signed in to github.com but when I close the notification it returns to Sign in to github.com
  • The output panel for GitHub Pull Request shows a stack trace:
[Info] Error signing in to github.com: Error: certificate has expired
[Info] Error: certificate has expired
	at TLSSocket.onConnectSecure (_tls_wrap.js:1317:34)
	at TLSSocket.emit (events.js:200:13)
	at TLSSocket._finishInit (_tls_wrap.js:792:8)
	at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12)

Nobody else I know is having this issue, so it’s probably an issue with my config, what server is the extension trying to connect to? Both the GitHub website and the https://hub.github.com/ command line tool work perfectly 🤔

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

the issue only happens during sign-in, afterwards the sync works even without workaround. I just did the following on my windows machine:

; in a command line, e.g. cmd.exe
set NODE_TLS_REJECT_UNAUTHORIZED=0
code

you can then sign-in without issues. then restart vs code normally, without the NODE_TLS_REJECT_UNAUTHORIZED env variable and settings sync should work 😃

For linux, I would expect that doing something such as

export NODE_TLS_REJECT_UNAUTHORIZED=0
code

should produce the same results

A proper workaround has finally been found. The expired certificate is in the macOS keychain and vscode / nodejs is just using it incorrectly. For anyone who comes across this in the future, here’s the fix: https://github.com/microsoft/vscode/issues/97434#issuecomment-812094349

I’m closing this issue, because all that really needs to happen now is vscode adds detection of this issue and shows a useful error message.

A proper workaround has finally been found. The expired certificate is in the macOS keychain and vscode / nodejs is just using it incorrectly. For anyone who comes across this in the future, here’s the fix: microsoft/vscode#97434 (comment)

I’m closing this issue, because all that really needs to happen now is vscode adds detection of this issue and shows a useful error message.

It’s only a “proper workaround” then if you’re running OSX then 😕

Any known workarounds for those running on Windows/WSL/Ubuntu?