I need help with a Python script that retrieves ticket information from our JIRA instance. I keep running into SSL connection problems and I’m not sure what I’m doing wrong.
When I run this code, I get tons of SSL error messages saying it can’t connect to the server. The errors mention something about _ssl.c and ConnectionError. It tries to retry the connection 3 times but always fails.
If I change the verify setting to False, the script works but I get security warnings about unverified HTTPS requests. I don’t want to disable SSL verification because our company requires secure connections.
What am I missing in my configuration? Is there a better way to handle the SSL certificates when connecting to JIRA?
I encountered similar SSL issues while connecting to JIRA. It’s likely that you’re only referencing a single certificate instead of the entire certificate chain, which often includes intermediate certificates. Make sure to create a certificate bundle that consolidates both the server certificate and any intermediate CA certificates. This can typically be provided by your system administrator or can be extracted directly from your browser when accessing the JIRA URL. Additionally, consider utilizing your system’s certificate store by setting verify=True, allowing the library to utilize your operating system’s trusted certificate repository, which usually contains the necessary intermediate certificates. If problems persist, verify whether your JIRA server mandates client certificates for authentication, as some corporate environments require both server validation and client certificate usage.
Your SSL certificate path seems to be incorrect or incomplete. Instead of pointing to a single certificate file, consider using a certificate bundle approach or allow Python to handle SSL verification automatically. Start by testing without a custom certificate path by setting ‘verify’: True, which will make the library use your system’s default certificate store. If that doesn’t work, consult your IT department as they may provide a custom CA certificate that you need to install. For me, I resolved similar issues by downloading the complete certificate chain from my browser. Just visit your JIRA URL, click on the lock icon, view the certificate details, and export the full chain as a .pem file. Reference that file in your verify parameter, and ensure that your server URL is correct, including the port, since SSL errors can sometimes obscure basic connectivity issues.
check if your company uses a proxy server - that’s what caused my ssl errors with jira-python. try adding proxy settings to your config or ask it about certificate bundles they might’ve already set up for devs.