Closed richard-nilsson closed 1 year ago
Have a look at these parameters https://github.com/devopshq/teamcity/blob/develop/dohq_teamcity/configuration.py#L82-L91
# SSL/TLS verification
# Set this to false to skip verifying SSL certificate when calling API
# from https server.
self.verify_ssl = True
# Set this to customize the certificate file to verify the peer.
self.ssl_ca_cert = None
# client certificate file
self.cert_file = None
# client key file
self.key_file = None
YES!
That did the trick:
config.ssl_ca_cert = '/etc/pki/tls/certs/cacert.pem'
And voila! No SSL errors!
Many thanks.
Hello,
At my current assignment, we have left basic authentication, and only use Token based identification. After quite some searching on the web, I found how to configure this: ...
tc_token = <get token>
config = Configuration()
config.api_key = {'mytoken': tc_token}
config.api_key_prefix = {'mytoken': 'Bearer'}
config.active_api_key = 'mytoken'
tc = TeamCity(url, auth_settings=["Token"], configuration=config)
... However, I get SSL error. After more searching on the WEB, I solved the problem when using SSL Verification for the requests.get() call:cacert_file = "/etc/pki/tls/certs/cacert.pem"
response = requests.get(url, headers=headers, verify=cacert_file)
Is there a way to configure the TeamCity() call in dohq to use SSL verification in the same way as it is possible for a requests.get() call?
Regards, Richard