python-sonarqube-api icon indicating copy to clipboard operation
python-sonarqube-api copied to clipboard

Can't connect via SSL

Open u84six opened this issue 3 years ago • 0 comments

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

u84six avatar Oct 04 '22 16:10 u84six