SSL cert error fix on jupyter notebook
Safer way to add trusted API
Install certifi
$ pip install certifi
# find out the path
$ python -m  certifi
 
Export trusted cert of API url
- In Google Chrome, browse to the API url, e.g., https://api.openai.com/v1/engines
 
- Export the cert. e.g., browser address bar > Connection is secure > Certificate is valid > Certificate Viewer, Details > Export
 
Add cert to certifi.pem
- Open certifi.pem.
 
- Add the downloaded cert to the bottom
 
For example,
-----BEGIN CERTIFICATE-----
# cert signature
-----END CERTIFICATE-----
- Restart jupter notebook
 
  
  
Created 2024-01-04T14:33:41+08:00 · Edit