shijl0925 / python-sonarqube-api

Python Client library for interacting with Community, Developer, and Enterprise Editions SonarQube's REST APIs and SonarCloud's REST APIs.
https://python-sonarqube-pro-api.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
133 stars 77 forks source link

Can't connect via SSL #64

Open u84six opened 2 years ago

u84six commented 2 years ago

I'm trying to connect to a SQ server 9.6 via SSL and I'm receiving an error:

HTTPSConnectionPool(host='company.name.com', port=443): Max retries exceeded with url: /sonar/api/server/version (Caused by SSLError(SSLError(9, '[SSL] PEM lib (_ssl.c:4065)')))

The code I'm using is:

`URL = 'https://company.name.com/sonar' USERNAME = 'admin' PASSWORD = 'admin' CERT = 'company.name.com.pem'

cert_path = Path(CERT)

if cert_path.is_file(): sonar = SonarQubeClient(sonarqube_url=URL, username=USERNAME, password=PASSWORD, cert=CERT) version = sonar.server.get_server_version() print(version)`

If I try the same api request using a curl command, it works. Is there any chance getting SSL working with this API