gatsbyjs/gatsby · error
SelfSignedCertificate
SelfSignedCertificate
Error message
We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed.
What it means
Error "We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed." thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-source-contentful/src/fetch.js:171
// Allow passing of custom configuration to the Contentful SDK like headers
...(pluginConfig.get(`contentfulClientConfig`) || {}),
}
return contentfulClientOptions
}
function handleContentfulError({
e,
reporter,
contentfulClientOptions,
pluginConfig,
}) {
let details
let errors
if (e.code === `ENOTFOUND`) {
details = `You seem to be offline`
} else if (e.code === `SELF_SIGNED_CERT_IN_CHAIN`) {
reporter.panic({
id: CODES.SelfSignedCertificate,
context: {
sourceMessage: `We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed.`,
},
})
} else if (e.responseData) {
if (
e.responseData.status === 404 &&
contentfulClientOptions.environment &&
contentfulClientOptions.environment !== `master`
) {
// environments need to have access to master
details = `Unable to access your space. Check if ${chalk.yellow(
`environment`
)} is correct and your ${chalk.yellow(
`accessToken`
)} has access to the ${chalk.yellow(
contentfulClientOptions.environmentView on GitHub (pinned to 8b06340921)
Solutions
- Remove self-signed SSL certificates or add them to your system's trusted certificate store.
- Set the NODE_EXTRA_CA_CERTS environment variable to point at the CA bundle that includes your certificate.
When it happens
Trigger: Thrown at packages/gatsby-source-contentful/src/fetch.js:171 when the library encounters an invalid state.
Common situations: Occurs when the connection to the Contentful API fails TLS verification, usually because a self-signed or corporate proxy certificate is installed. Install the certificate in the system/Node trust store or configure NODE_EXTRA_CA_CERTS.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/22bfdf5d6cfa457d.
Report an issue: GitHub.