I'm trying to connect jira's API via python (3.6) and i keep getting error message:
WARNING:root:HTTPSConnectionPool(host='jira', port=443): Max retries exceeded with url: /secure/rest/api/2/serverInfo/rest/api/2/serverInfo (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) while doing GET https://jira/secure/rest/api/2/serverInfo/rest/api/2/serverInfo [{'params': None, 'headers': {'User-Agent': 'python-requests/2.20.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json,.;q=0.9', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Atlassian-Token': 'no-check'}}] WARNING:root:Got ConnectionError [HTTPSConnectionPool(host='jira', port=443): Max retries exceeded with url: /secure/rest/api/2/serverInfo/rest/api/2/serverInfo (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))] errno:None on GET https://jira/secure/rest/api/2/serverInfo/rest/api/2/serverInfo {'response': None, 'request': <PreparedRequest [GET]>}{'response': None, 'request': <PreparedRequest [GET]>} WARNING:root:Got recoverable error from GET https://jira/secure/rest/api/2/serverInfo/rest/api/2/serverInfo, will retry [1/3] in 7.466325591185807s. Err: HTTPSConnectionPool(host='jira', port=443): Max retries exceeded with url: /secure/rest/api/2/serverInfo/rest/api/2/serverInfo (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
This is my code:
un='myusername'
pwd='mypassword'
server='https://jira/xxxx'
jira = jira = JIRA(basic_auth=(un, pwd), options={'server': server})
issue = jira.issue('some issue name')
print(issue.fields.project.key)
print(issue.fields.issuetype.name)
When using curl to the same server everything works good.
