SSL connection problems with Python JIRA when fetching ticket status

I am trying to create a Python script to retrieve the status of a bug from our JIRA system but I am facing SSL certificate issues. This is my current code:

import jira
from jira import JIRA

options = {
    'server': 'https://your-jira-instance.com:8443/',
    'verify': 'path/to/certificate.pem'
}

jira_client = JIRA(options, basic_auth=('user', 'password'))

I keep encountering SSL errors like _ssl.c:2747, and the connection times out after a few attempts. If I change 'verify': False, the program runs but I receive warnings about insecure HTTPS requests. I’ve also tried using a different certificate file, but the problem persists. Can someone guide me on how to resolve these SSL verification issues when connecting to JIRA using Python?

Had this exact issue at work with our JIRA’s self-signed cert. Python can’t validate it against its trusted CA store. Don’t just disable verification - grab the full certificate chain from your JIRA server instead. Click the lock icon in your browser when you’re on JIRA and export the complete chain as a .pem file. Make sure you’re using absolute paths, not relative ones. I wasted hours on that stupid mistake. If your company uses internal CAs, you’ll need the root certificate from IT and append it to your cert file.

had a similar issue b4. maybe try putting the cert in your python env’s CA bundle instead of just a file path. also, check if your jira admin changed the ssl cert recently - that made ours fail.

Hit this exact issue when we migrated to a new JIRA instance. Your certificate path needs to include both the server cert and any intermediate certificates - not just one of them. Here’s what fixed it for me: grab the requests library’s certificate bundle with import requests; print(requests.certs.where()), then just append your JIRA certificate to that file. Also check if your JIRA server needs SNI (Server Name Indication) - corporate proxies and load balancers love to break SSL handshakes. Before diving into Python debugging, test the connection directly with openssl s_client -connect your-jira-instance.com:8443 to verify the certificate chain is actually complete.