Support Questions

Find answers, ask questions, and share your expertise

How i can ignore ssl certification on python?

New Contributor

I am trying to run an example from the cloudera documentation site in python. I am getting ssl certificate error:


ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)


Getting a certificate is not a solution to my problem. Can I ignore the certificate validation when accessing the api, similar to how it can be done through a regular request?


For example:


import requests
res = requests.get(url, auth=(login, pass), timeout= 1000000, verify= False)



my code:


import cm_client

cm_client.configuration.username = login
cm_client.configuration.password = pass

api_url = api_host + ':' + port + '/api/' + api_version
api_client = cm_client.ApiClient(api_url)
cluster_api_instance = cm_client.ClustersResourceApi(api_client)