nodejs / nodejs/node

NODE_EXTRA_CA_CERTS does not work when set in env file

オープン
#51,426 コメント 11 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

confirmed-bug dotenv
主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

Version

v21.5.0

Platform

Darwin MACM-YXGQWMKDQK 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

Run
node --env-file ./config/.env.development

With env file containing NODE_EXTRA_CA_CERTS

The variable is not taken into account.

Run same script but exporting the variable first, it is correctly taken into account.

How often does it reproduce? Is there a required condition?

Always!

What is the expected behavior? Why is that the expected behavior?

The ca cert should be taken into account

What do you see instead?

It is not correctly taken into account and I get errors about self signed certificates

Additional information

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、node --env-file ./config/.env.developmentNODE_EXTRA_CA_CERTS を含む env ファイルを使って問題を再現し、その後、同じスクリプトを実行する前に変数を export する場合と比較します。env ファイルから読み込まれた証明書が有効になり、自己署名証明書のエラーが発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js
領域
backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。