Skip to content
On this page

SSL certificate problem: self signed certificate in certificate chain

Title
SSL certificate problem: self signed certificate in certificate chain
Category
Troubleshooting
Tags
Aliases
SSL certificate problem: self signed certificate in certificate chain{ "SSL certificate problem": "self signed certificate in certificate chain" }
Created
last year
Updated
last year

On npm

Bypassing (risky!)

sh
npm config set strict-ssl false --global
npm config set strict-ssl false --global

Setting a certificate file

sh
npm config set cafile /path/to/your/cert.pem --global
npm config set cafile /path/to/your/cert.pem --global

On Node.js

Bypassing (risky!)

sh
# windows
set NODE_TLS_REJECT_UNAUTHORIZED=0

# macOS
export NODE_TLS_REJECT_UNAUTHORIZED=0
# windows
set NODE_TLS_REJECT_UNAUTHORIZED=0

# macOS
export NODE_TLS_REJECT_UNAUTHORIZED=0

Setting a certificate file

sh
# windows
set NODE_EXTRA_CA_CERTS=/path/to/your/cert.pem

# macOS
export NODE_EXTRA_CA_CERTS=/path/to/your/cert.pem
# windows
set NODE_EXTRA_CA_CERTS=/path/to/your/cert.pem

# macOS
export NODE_EXTRA_CA_CERTS=/path/to/your/cert.pem

On Git

Bypassing (risky!)

sh
git config http.sslVerify false
git config http.sslVerify false

Setting a certificate file

sh
git config http.sslCAinfo /your/path/to/cacert-client.pem
git config http.sslCAinfo /your/path/to/cacert-client.pem

On PyPi

Bypassing (risky!)

sh
pip install <package_name> --trusted-host pypi.python.org
pip install <package_name> --trusted-host pypi.python.org

Setting a certificate file

sh
pip install --cert /path/to/your/cert.pem
pip install --cert /path/to/your/cert.pem

References

Released under the MIT License.