Skip to content

docs: self-signed certificate / internal CA handling for GitHub Enterprise#1050

Merged
brunoborges merged 1 commit into
mainfrom
docs/self-signed-ca-enterprise
Jun 23, 2026
Merged

docs: self-signed certificate / internal CA handling for GitHub Enterprise#1050
brunoborges merged 1 commit into
mainfrom
docs/self-signed-ca-enterprise

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

What

Adds a new "Self-signed certificates and internal CAs (GitHub Enterprise)" section to docs/advanced-usage.md.

Why

Users on GitHub Enterprise Server, or behind a TLS-inspecting corporate proxy, hit Error: self signed certificate in certificate chain when setup-java downloads JDK metadata and archives. There was no documentation explaining the cause or the secure way to resolve it, which leads people toward unsafe workarounds like disabling TLS verification.

What the new section covers

  • The symptom (self signed certificate in certificate chain) and its root cause: an internal/self-signed CA not present in the runner's trust store.
  • The recommended secure fix: trust the internal CA via NODE_EXTRA_CA_CERTS (Node honors it, and so do @actions/http-client and @actions/tool-cache), with two YAML examples — CA already on the runner, and CA written from a secret.
  • A self-hosted-runner option (install the CA into the OS trust store).
  • An explicit GitHub Enterprise callout.
  • A security warning against disabling TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0): the JDK download has no checksum/signature fallback, so TLS is the only integrity guarantee and disabling it opens a MITM / supply-chain path.

Also adds a matching table-of-contents entry.

Notes

  • Docs-only change; no source or dist/ changes.
  • prettier --check passes on the edited file.

Refs #640

…Hub Enterprise

Adds an advanced-usage section explaining the 'self signed certificate in
certificate chain' error seen on GitHub Enterprise Server and behind
TLS-inspecting proxies. Recommends the secure fix of trusting the internal
CA via NODE_EXTRA_CA_CERTS (or the OS trust store on self-hosted runners),
with a GitHub Enterprise callout, and warns against disabling TLS
verification since the JDK download has no checksum fallback.

Refs #640

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@brunoborges brunoborges requested a review from a team as a code owner June 23, 2026 01:48
Copilot AI review requested due to automatic review settings June 23, 2026 01:48
@brunoborges brunoborges mentioned this pull request Jun 23, 2026
@brunoborges brunoborges merged commit a9a46fb into main Jun 23, 2026
4 checks passed
@brunoborges brunoborges deleted the docs/self-signed-ca-enterprise branch June 23, 2026 01:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation to help GitHub Enterprise Server (GHES) and corporate-proxy users resolve self signed certificate in certificate chain errors safely when actions/setup-java downloads JDK metadata/archives, steering users toward trusting the internal CA instead of disabling TLS verification.

Changes:

  • Adds a new “Self-signed certificates and internal CAs (GitHub Enterprise)” section explaining cause, secure remediation, and security implications.
  • Adds two workflow YAML examples showing how to provide an internal CA bundle via NODE_EXTRA_CA_CERTS.
  • Adds a matching table-of-contents entry.
Show a summary per file
File Description
docs/advanced-usage.md Adds GHES/internal-CA guidance and examples for resolving self-signed certificate chain errors securely.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread docs/advanced-usage.md
Comment on lines +683 to +687
- name: Trust the internal CA
run: echo "NODE_EXTRA_CA_CERTS=/etc/ssl/certs/internal-ca.pem" >> "$GITHUB_ENV"

- uses: actions/setup-java@v5
with:
Comment thread docs/advanced-usage.md
Comment on lines +696 to +701
- name: Write and trust the internal CA
run: |
echo "${{ secrets.INTERNAL_CA_PEM }}" > "${RUNNER_TEMP}/internal-ca.pem"
echo "NODE_EXTRA_CA_CERTS=${RUNNER_TEMP}/internal-ca.pem" >> "$GITHUB_ENV"

- uses: actions/setup-java@v5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants