
VScodeの拡張機能で自前 SSL 証明書を信頼する方法How to Make VS Code Extensions Trust a Self-Signed SSL Certificate
VS Code拡張機能が自己署名証明書のサーバーに接続できない問題を、環境変数 NODE_EXTRA_CA_CERTS に .crt ファイルのパスを指定して解決する手順を紹介する。社内環境や検証環境で役立つ。
Shows how to fix VS Code extensions failing to reach servers with self-signed certificates by pointing the NODE_EXTRA_CA_CERTS variable at a .crt file, useful for internal or test environments.
AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (qiita.com) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (qiita.com).
自己署名証明書への接続
VS Codeの拡張機能が、自己署名証明書(オレオレ証明書)を使うサーバーに接続できない問題への対処法が紹介されている。社内環境や検証環境で役立つとされる。
環境変数でパスを指定
解決策は、環境変数 NODE_EXTRA_CA_CERTS に、信頼させたい証明書(.crt ファイル)のパスを指定することである。手順では、次の形式で export する。
export NODE_EXTRA_CA_CERTS={オレオレ証明書(.crt)のパス}
波括弧の部分には、手元の .crt ファイルのパスを入れる。
設定時の注意点
手順には、実行するたびに追記される点への注意書きがある。間違った内容を設定してしまった場合は、~/.bashrc ファイルを直接編集して直すようにと説明されている。
誤ったパスで実行を繰り返すと、そのたびに記述が増えていく。やり直す際は、コマンドを再実行するのではなくファイルの編集で対応する、という流れになる。
Trusting a self-signed certificate
VS Code extensions can fail to connect to servers that use a self-signed certificate. This article describes a fix for that problem, which can come up in internal or test environments.
The approach is to set the environment variable NODE_EXTRA_CA_CERTS so that it points to the path of the self-signed certificate, which is a .crt file. The command shown is an export statement in the form export NODE_EXTRA_CA_CERTS={path to the self-signed .crt certificate}.
Editing the shell configuration
The article includes a warning about the export line: according to the source, it is appended each time it is run. If a mistake is made, the reader is told to edit the ~/.bashrc file directly rather than running the command again.
The source also shows lines containing Debian's home, support and bug-report URLs, which suggests the steps were carried out on a Debian-based system. The article does not say more about those lines.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPoko自己署名の証明書だと、VS Codeの拡張機能がつながらなくなるの? どう直すのかな。So VS Code extensions can't connect when a server uses a self-signed certificate? How do you fix that?
- TECHガイドTECH Guideこの記事では、環境変数 NODE_EXTRA_CA_CERTS に、自前の証明書(.crt)のパスを指定する方法を紹介しているよ。The post shows how to point the NODE_EXTRA_CA_CERTS environment variable at the path of your own certificate, the .crt file.
- ポコPokoファイルの場所を環境変数に書くだけなんだね。それは、どんな人の役に立つの?So you just put the file's location in an environment variable? Who is that actually useful for?
- TECHガイドTECH Guide記事だと、社内環境や検証環境のように、自己署名証明書のサーバーを使う場面で役立つと説明されているよ。The post says it's handy for internal or test environments, where servers use self-signed certificates.
- ポコPokoじゃあ自前の.crtを指定すれば、拡張機能がそのサーバーに接続できるようになる、ってことだね。So if I point it at my own .crt, the extension should be able to reach that server. Got it.
- TECHガイドTECH Guideうん。ただ、実行するたびに追記されるから、間違えたら ~/.bashrc を直接編集してね、と注意書きがあるよ。Right. One caution: each run appends the line, so if you get it wrong, the post says to edit ~/.bashrc directly.
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy





