Home›VS Code / Dev Env›VScodeの拡張機能で自前 SSL 証明書を信頼する方法
VScodeの拡張機能で自前 SSL 証明書を信頼する方法

VScodeの拡張機能で自前 SSL 証明書を信頼する方法How to Make VS Code Extensions Trust a Self-Signed SSL Certificate

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary

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.

  1. ポコPoko自己署名の証明書だと、VS Codeの拡張機能がつながらなくなるの? どう直すのかな。So VS Code extensions can't connect when a server uses a self-signed certificate? How do you fix that?
  2. 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.
  3. ポコPokoファイルの場所を環境変数に書くだけなんだね。それは、どんな人の役に立つの?So you just put the file's location in an environment variable? Who is that actually useful for?
  4. TECHガイドTECH Guide記事だと、社内環境や検証環境のように、自己署名証明書のサーバーを使う場面で役立つと説明されているよ。The post says it's handy for internal or test environments, where servers use self-signed certificates.
  5. ポコPokoじゃあ自前の.crtを指定すれば、拡張機能がそのサーバーに接続できるようになる、ってことだね。So if I point it at my own .crt, the extension should be able to reach that server. Got it.
  6. 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.
記事情報・収集記録Article details & collection record
出典Source
Qiita VSCodeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
InfoInformational(VS Code / Dev Env 56件中、同等以上 56件)(56 of 56 VS Code / Dev Env entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
1.9 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔷VS Code / Dev Env の他の記事More from VS Code / Dev Envもっと見る →View more →

QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順
QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順Manage Qiita Articles in a GitHub Repository and Grow Your Contribution Graph: Write and Publish with Just VSCode and a Terminal
Qiita VSCode23h ago
${…} が化ける日 ― VS Code から Mind を実行する
${…} が化ける日 ― VS Code から Mind を実行するThe Day ${…} Breaks: Running Mind from VS Code
Qiita VSCode1d ago
日本語プログラミング言語ドリトル をVSCodeターミナルでビルドできる環境を構築(CLIラッパークラスの実装)
日本語プログラミング言語ドリトル をVSCodeターミナルでビルドできる環境を構築(CLIラッパークラスの実装)Building a Setup to Compile the Japanese Programming Language Dolittle from the VSCode Terminal (Implementing a CLI Wrapper Class)
Qiita VSCode1d ago
ないならば、作ってしまおう、デバッガー ~VS Code 拡張編~ x86 の C# を VS Code で止める
ないならば、作ってしまおう、デバッガー ~VS Code 拡張編~ x86 の C# を VS Code で止めるIf It Doesn't Exist, Build It: A Debugger as a VS Code Extension for Breaking on x86 C#
Qiita VSCode2d ago
ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つ
ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つJapanese Input in VS Code on ChromeOS Linux: No fcitx Needed, Just Three Launch Options
Qiita VSCode3d ago
「送り仮名を無視する言語」のために Language Server を作った話 ― 日本語プログラミング言語 Mind の VS Code 拡張
「送り仮名を無視する言語」のために Language Server を作った話 ― 日本語プログラミング言語 Mind の VS Code 拡張Building a Language Server for a Language That Ignores Okurigana: A VS Code Extension for the Japanese Language Mind
Qiita VSCode3d ago
ページ上部へScroll to top