# Full error: \[SSL: CERTIFICATE\_VERIFY\_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:1028)

**URL:** <https://discuss.ai.google.dev/t/full-error-ssl-certificate-verify-failed-certificate-verify-failed-unable-to-get-local-issuer-certificate-ssl-c-1028/107275>\
**Category:** Gemini API\
**Tags:** gemini-15, api, models\
**Created:** [October 10, 2025, 10:26am UTC](https://discuss.ai.google.dev/t/full-error-ssl-certificate-verify-failed-certificate-verify-failed-unable-to-get-local-issuer-certificate-ssl-c-1028/107275 "2025-10-10T10:26:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lalit\_Moharana](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lalit_moharana/32/67489_2.png) [@Lalit\_Moharana](https://discuss.ai.google.dev/u/Lalit_Moharana)\
**Post date:** [October 10, 2025, 10:26am UTC](https://discuss.ai.google.dev/t/full-error-ssl-certificate-verify-failed-certificate-verify-failed-unable-to-get-local-issuer-certificate-ssl-c-1028/107275/1 "2025-10-10T10:26:27Z")

</div>

when i am trying to use gemini model on local windows machine im getting the bellow error

here is my code snippet

import os  
import warnings  
from google import genai  
from google.genai import types

http\_options = types.HttpOptions(  
client\_args={“verify”: False} # Disables cert verification in httpx.Client  
)

client = genai.Client(  
api\_key=os.getenv(“GEMINI\_API\_KEY”, “xxxxx”),  
http\_options=http\_options  
)

response = client.models.generate\_content(  
model=“gemini-2.5-flash”,  
contents=“Hello”  
)

getting the bellow error

[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: unable to get local issuer certificate (\_ssl.c:1028)

---

<div class="post-metadata">

**Author:** ![Shivam\_Singh2](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/shivam_singh2/32/31553_2.png) [@Shivam\_Singh2](https://discuss.ai.google.dev/u/Shivam_Singh2)\
**Post date:** [October 21, 2025, 10:56am UTC](https://discuss.ai.google.dev/t/full-error-ssl-certificate-verify-failed-certificate-verify-failed-unable-to-get-local-issuer-certificate-ssl-c-1028/107275/3 "2025-10-21T10:56:31Z")

</div>

Hi @Lalit_Moharana  
Welcome to the AI Forum!!!

Thank you for reaching out.  
Disabling verification with `verify=False` may not always resolve the issue. Please ensure that the `SSL_CERT_FILE` environment variable is set correctly on your system. You can do this by running the following command: `export SSL_CERT_FILE='client.pem'`

If this does not resolve your problem, Than please updating `certifi`, Python, or running in a clean virtual environment.
