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

unable to get local issuer certificate #98

Closed
gartnera opened this issue May 3, 2019 · 11 comments
Closed

unable to get local issuer certificate #98

gartnera opened this issue May 3, 2019 · 11 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH

Comments

@gartnera
Copy link

gartnera commented May 3, 2019

  • VSCode Version:
  • Local OS Version: MacOS
  • Remote OS Version: ubuntu 18.04
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Use vscode insiders with ssh remote
  2. Be inside corporate proxy with ssl break and inspect (custom CA)
  3. Try to install any extension

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

The initial install works and the second stage cpptools are also downloaded after I manually installed cpptools from .vsix. I just can't install extensions.

Log:

[2019-05-03 23:09:17.753] [remoteagent] [info] Installing extension: ms-vscode.cpptools
[2019-05-03 23:09:17.755] [remoteagent] [info] Scanned user extensions: 0
[2019-05-03 23:09:17.809] [remoteagent] [error] Failed to install extension: ms-vscode.cpptools unable to get local issuer certificate
[2019-05-03 23:09:18.153] [remoteagent] [info] Scanned user extensions: 0
[2019-05-03 23:09:18.171] [remoteagent] [info] Scanned system extensions: 24
[2019-05-03 23:09:57.227] [remoteagent] [info] Scanned user extensions: 0
[2019-05-03 23:09:57.227] [remoteagent] [info] Installing the extension: ms-vscode.cpptools
[2019-05-03 23:09:58.605] [remoteagent] [info] Extracted extension to /home/agartner/.vscode-remote/extensions/.ms-vscode.cpptools-0.22.1: ms-vscode.cpptools
[2019-05-03 23:09:58.605] [remoteagent] [info] Renamed to /home/agartner/.vscode-remote/extensions/ms-vscode.cpptools-0.22.1
[2019-05-03 23:09:58.609] [remoteagent] [info] Installation completed. ms-vscode.cpptools
[2019-05-03 23:09:58.613] [remoteagent] [info] Successfully installed the extension: ms-vscode.cpptools
@mjbvz mjbvz added the ssh Issue in vscode-remote SSH label May 3, 2019
@roblourens
Copy link
Member

  • Have you set the http.proxy setting in vscode?
  • Can you install extensions in a local vscode window?

@roblourens roblourens added the info-needed Issue requires more information from poster label May 4, 2019
@mjbvz
Copy link

mjbvz commented May 4, 2019

Also, can you connect to the marketplace at all from the remote? For example, does wget marketplace.visualstudio.com work from a ssh terminal?

@gartnera
Copy link
Author

gartnera commented May 6, 2019

  • Have you set the http.proxy setting in vscode?

Yes

  • Can you install extensions in a local vscode window?

Yes, without any changes from default (no changes to http.proxy or http.proxyStrictSSL).

Also, can you connect to the marketplace at all from the remote? For example, does wget marketplace.visualstudio.com work from a ssh terminal?

Yes. curl.txt

After investigating further, I can install extensions if I set http.proxyStrictSSL to false, but I'd prefer not to do that. Can I somehow debug which certificates are loaded and where they are being loaded from?

Also note that when running vscode on the server via X11 forwarding, I can install extensions without any configuration. chromium-browser also works on the server.

Perhaps this is because you're not running full electron on the server side anymore?

Yep that's it. After setting NODE_EXTRA_CA_CERTS I can install extensions fine.

Please document or point NODE_EXTRA_CA_CERTS at /etc/ssl/certs/ca-certificates.crt by default.

@roblourens
Copy link
Member

So electron sets NODE_EXTRA_CA_CERTS by default?

Do you know about this @joaomoreno?

@gartnera
Copy link
Author

gartnera commented May 6, 2019

I suspect electron uses the libnss database and therefore sees my existing certs that I use with chrome instance (I don't know anything about electron). Plain nodejs apparently only uses it's built in certs and NODE_EXTRA_CA_CERTS if set.

@joaomoreno
Copy link
Member

@roblourens 🤷‍♂️

@vscodebot vscodebot bot closed this as completed May 22, 2019
@vscodebot
Copy link

vscodebot bot commented May 22, 2019

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!

@gartnera
Copy link
Author

Is there more information you need from me?

@roblourens roblourens reopened this May 22, 2019
@roblourens
Copy link
Member

How did you configure these with Chrome? I have no clue whether setting that environment var by default is the right thing to do or not.

@gartnera
Copy link
Author

It looks like #231 and #419 are duplicates of this issue. #231 is assigned to a milestone so I assume it's being worked on.

@roblourens
Copy link
Member

Good call. Didn't realize we had #231. Will close as dupe then

@roblourens roblourens added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels May 23, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

4 participants