-
Notifications
You must be signed in to change notification settings - Fork 676
Closed
Description
It seems to me as if the gitlab package does not use the REQUESTS_CA_BUNDLE
environment variable to do TLS verification:
gl = gitlab.Gitlab(remote_host_url, token, api_version=4)
gl.projects.get(id)
Fails:
(self, request, stream, timeout, verify, cert, proxies)
504 if isinstance(e.reason, _SSLError):
505 # This branch is for urllib3 v1.22 and later.
--> 506 raise SSLError(e, request=request)
507
508 raise ConnectionError(e, request=request)
SSLError: HTTPSConnectionPool(host='gitlab', port=443): Max retries exceeded with url: //api/v4/projects/12 (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),))
If I explicitly add the content of REQUESTS_CA_BUNDLE
the connection works:
gl = gitlab.Gitlab(remote_host_url, token, api_version=4, ssl_verify=os.environ['REQUESTS_CA_BUNDLE'])
Is this expected behavior? In my opinion the gitlab package should pass the content of REQUESTS_CA_BUNDLE
to requests if it exists.