microsoft / microsoft/vscode-remote-release

Cloning to development container and extensions fail with self-signed SSL certificate

Open
#3,713 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

containers feature-request plan-review
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

I have found two issues when working with development containers that are related to self-signed SSL certificates:

  1. When trying to install extensions through .devcontainer.json, this fails due to being behind a corporate firewall, that introduces self-signed certificates. Settings specified in the "non-containerised" VS Code to ignore SSL errors do not propagate down to the container created to install the extensions in the remote environment.

  2. When trying to directly clone a repository into a container volume, since I am cloning from our own git servers, which also issue the same problematic self-signed certificate, the cloning fails. Note that since cloning fails, no settings can be retrieved from .devcontainer.json either, so the solution can't rely on that.

Workarounds found so far:

  1. For the extensions, they manually install fine after container creation. In a separate issue it was specified that mounting additional volumes can make them persistent but it's not a fully automated solution. In my own containers I'm installing the self-signed certificate as a trusted CA too.

  2. For the git cloning, I've manually modified the Dockerfile used by the extension located at C:\Users\{username}\.vscode\extensions\ms-vscode-remote.remote-containers-0.140.1\scripts\volumeBootstrap.Dockerfile and simply added an extra command at the end RUN git config --global http.sslVerify false. This allowed the cloning to work without issue.

It would be ideal if the extension would nicely propagate the settings around SSL down to the underlying.

Otherwise the extension is pretty amazing :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the extension's volumeBootstrap.Dockerfile and the .devcontainer.json settings described in the report. Trace the extension-install and direct repository-clone paths, including where Git SSL behavior is configured. Done means both workflows handle the reported self-signed certificate scenario without manual Dockerfile changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, git, vscode
Domain
devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.