Repository navigation
Description
- VSCode Version: 1.63.2
- Local OS Version: Win 10.0.19042 Build 19042
- Remote OS Version: Debian GNU/Linux 10 (buster)
- Remote Extension/Connection Type: Docker
- Logs: https://rentry.co/mbyya
Steps to Reproduce:
I have similar problems to #2987 #986 #5620 but I could not find the solution there. I also tried the vscode insider.
I am on a business computer running Windows 10 (+ Ubuntu WSL). This machine has some custom proxy/certificates in place. Extensions defined in .devcontainer/devcontainer.json are not installed during the container build process---but they can be installed with the GUI later on (as indicated in the last part of the attached log). A part from (silently) not installing the extensions, everything is fine. Before doing anything, I checked if there were some issues with proxy/certificates in the container terminal. I could ping/curl websites and I could apt update && apt upgrade without problems. This suggests that the custom network settings are correctly picked up by the container (perhaps from the WSL?).
Running the server.sh code to install the extension as it appears in the logs (and adding export NODE_TLS_REJECT_UNAUTHORIZED=0 as an attempt to fix the issue)
/root/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/server.sh --log debug --force-disable-user-env --use-host-proxy --disable-telemetry --port 0 --extensions-download-dir /root/.vscode-server/extensionsCache --install-extension eamodio.gitlens --start-server --disable-websocket-compressionbut it issues the error unable to get local issuer certificate.
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
Extension host agent listening on 39693
[12:04:58] Extension host agent started.
Installing extensions...
(node:13197) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
unable to get local issuer certificate
[12:05:00] Error: Failed Installing Extensions: eamodio.gitlens
at S.installExtensions (/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/out/vs/server/remoteExtensionHostAgent.js:89:42)
at processTicksAndRejections (internal/process/task_queues.js:93:5)As I said, the container seems to have all the correct network parameters in place, but still I get an error on missing certificates. I also added export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt (and reinstalled the corporate certificates) but the problem persists.
Would you be able to help?
Activity
JackCaster commentedon Feb 2, 2022
Ok, I fixed this issue with a clearer mind. I'll leave a note here for posterity:
Retrieve the (corporate) certificate and save it at
.devcontainer/<certificate-name>.crt. Get the proxy info. Then, modify theDockerfile:There is no need to install the certificates with
update-ca-certificatesif you do not need them for other reasons than installing the extensions in the Docker container.JackCaster commentedon Mar 10, 2022
The solution does not work any longer. Despite
NODE_EXTRA_CA_CERTSbeing set, the Python extension is not installed when the image is built. In the output forLog (Remote Server)I see:Then, if I install the extension from the GUI, I get in
Log (Remote Server)So, it says there is a problem with the certificate but then the extension is installed anyway.
I am using vscode insider v. 1.66.0
chrmarti commentedon Mar 22, 2022
Tracking as #2393.