SSL_CERT_FILE env not observed since v0.15.0 #2071

Open
opened 2026-02-16 17:34:01 -05:00 by yindo · 9 comments
Owner

Originally created by @Pivert on GitHub (Oct 13, 2025).

Originally assigned to: @rekram1-node on GitHub.

Hi,

Our company is using a reverse proxy with a self signed ssl certificate for DPI.

Before v0.15.0, I just add to ADD

export SSL_CERT_FILE=/mycabundle.crt (Including the DPI CA)
before starting opencode

But this doesn't work anymore with v0.15.0 :

ERROR 2025-10-13T09:25:07 +229ms service=models.dev error=self signed certificate in certificate chain Failed to fetch models.dev
ERROR 2025-10-13T09:25:07 +1ms service=tui error=clipboard unavailable: No clipboard utility found. Install one of the following:
ERROR 2025-10-13T09:25:39 +6ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error={"error":{"code":"SELF_SIGNED_CERT_IN_CHAIN","path":"https://api.githubcopilot.com/chat/completions","errno":0}} stream error
ERROR 2025-10-13T09:25:39 +1ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error=self signed certificate in certificate chain process
ERROR 2025-10-13T09:25:39 +1ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error=self signed certificate in certificate chain model=gpt-5 failed to generate title
ERROR 2025-10-13T09:25:39 +0ms service=tui message=Error: self signed certificate in certificate chain name=UnknownError Server error

Adding NODE_TLS_REJECT_UNAUTHORIZED=0 fixes the problem (but is insecure).

Thanks,

Originally created by @Pivert on GitHub (Oct 13, 2025). Originally assigned to: @rekram1-node on GitHub. Hi, Our company is using a reverse proxy with a self signed ssl certificate for DPI. Before v0.15.0, I just add to ADD export SSL_CERT_FILE=/mycabundle.crt (Including the DPI CA) before starting opencode But this doesn't work anymore with v0.15.0 : ``` ERROR 2025-10-13T09:25:07 +229ms service=models.dev error=self signed certificate in certificate chain Failed to fetch models.dev ERROR 2025-10-13T09:25:07 +1ms service=tui error=clipboard unavailable: No clipboard utility found. Install one of the following: ERROR 2025-10-13T09:25:39 +6ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error={"error":{"code":"SELF_SIGNED_CERT_IN_CHAIN","path":"https://api.githubcopilot.com/chat/completions","errno":0}} stream error ERROR 2025-10-13T09:25:39 +1ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error=self signed certificate in certificate chain process ERROR 2025-10-13T09:25:39 +1ms service=session.prompt session=ses_6231c3a3effePdfY9bLMLBhz6g error=self signed certificate in certificate chain model=gpt-5 failed to generate title ERROR 2025-10-13T09:25:39 +0ms service=tui message=Error: self signed certificate in certificate chain name=UnknownError Server error ``` Adding NODE_TLS_REJECT_UNAUTHORIZED=0 fixes the problem (but is insecure). Thanks,
yindo added the bug label 2026-02-16 17:34:01 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 13, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #640: Same "self signed certificate in certificate chain" error with corporate proxy/SSL MIM
  • #1694: Corporate SSL certificate trust store issue with "unable to get local issuer certificate"
  • #2992: CA certificate issues preventing opencode from starting, mentions NODE_EXTRA_CA_CERTS workaround
  • #923: Similar "self signed certificate in certificate chain" error when accessing websites with Let's Encrypt certificates

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 13, 2025): This issue might be a duplicate of existing issues. Please check: - #640: Same "self signed certificate in certificate chain" error with corporate proxy/SSL MIM - #1694: Corporate SSL certificate trust store issue with "unable to get local issuer certificate" - #2992: CA certificate issues preventing opencode from starting, mentions NODE_EXTRA_CA_CERTS workaround - #923: Similar "self signed certificate in certificate chain" error when accessing websites with Let's Encrypt certificates Feel free to ignore if none of these address your specific case.
Author
Owner

@Pivert commented on GitHub (Oct 13, 2025):

I checked the 4 above issues, this is not a duplicate since:

  • The above issues are for older version which did not had this issue. (Downgrading to v0.14.7 fixes the problem)
  • The NODE_TLS_REJECT_UNAUTHORIZED=0 had no effect while here it also bypass the problem.
@Pivert commented on GitHub (Oct 13, 2025): I checked the 4 above issues, this is not a duplicate since: * The above issues are for older version which did not had this issue. (Downgrading to v0.14.7 fixes the problem) * The NODE_TLS_REJECT_UNAUTHORIZED=0 had no effect while here it also bypass the problem.
Author
Owner

@rekram1-node commented on GitHub (Oct 13, 2025):

this may have had to do with the bun upgrade to 1.3

@rekram1-node commented on GitHub (Oct 13, 2025): this may have had to do with the bun upgrade to 1.3
Author
Owner

@jayteaftw commented on GitHub (Nov 5, 2025):

Hey any luck or news on fixing this?

@jayteaftw commented on GitHub (Nov 5, 2025): Hey any luck or news on fixing this?
Author
Owner

@rekram1-node commented on GitHub (Nov 5, 2025):

@jayteaftw ill need to look into it, ill put it on my docket to look into today

@rekram1-node commented on GitHub (Nov 5, 2025): @jayteaftw ill need to look into it, ill put it on my docket to look into today
Author
Owner

@jayteaftw commented on GitHub (Nov 5, 2025):

@rekram1-node Hi sorry for the spam but I think it works as of v1.0.26!

I have done both

export NODE_TLS_REJECT_UNAUTHORIZED=0 
opencode --port 29831

and

export NODE_EXTRA_CA_CERTS=/path/to/CA/Certs/File
opencode --port 29831

and I do not get that error.
@Pivert can you confirm this?

@jayteaftw commented on GitHub (Nov 5, 2025): @rekram1-node Hi sorry for the spam but I think it works as of v1.0.26! I have done both ``` export NODE_TLS_REJECT_UNAUTHORIZED=0 opencode --port 29831 ``` and ``` export NODE_EXTRA_CA_CERTS=/path/to/CA/Certs/File opencode --port 29831 ``` and I do not get that error. @Pivert can you confirm this?
Author
Owner

@rekram1-node commented on GitHub (Nov 5, 2025):

hey no worries for spam, glad it's working for u

@rekram1-node commented on GitHub (Nov 5, 2025): hey no worries for spam, glad it's working for u
Author
Owner

@jehrhardt commented on GitHub (Nov 19, 2025):

@jayteaftw for me export NODE_TLS_REJECT_UNAUTHORIZED=0 works, but export NODE_EXTRA_CA_CERTS=/path/to/CA/Certs/File does not. I use OpenCode 1.0.78.

@jehrhardt commented on GitHub (Nov 19, 2025): @jayteaftw for me `export NODE_TLS_REJECT_UNAUTHORIZED=0` works, but `export NODE_EXTRA_CA_CERTS=/path/to/CA/Certs/File` does not. I use OpenCode 1.0.78.
Author
Owner

@okmanideep commented on GitHub (Dec 30, 2025):

pointing NODE_EXTRA_CA_CERTS to our company's ca certificate worked for me.

@okmanideep commented on GitHub (Dec 30, 2025): pointing `NODE_EXTRA_CA_CERTS` to our company's ca certificate worked for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2071