On a Redhat box (Red Hat Enterprise Linux Workstation release 6.8 (Santiago)) I am able to make a curl
request to the JIRA instance like follows:
curl -k -D- -u "user":"password" -X GET -H "Content-Type: application/json" https://some_url/jira/rest/api/2/search?jql=assignee=fritz
This request returns a valid json with the actual data in it. So far so good.
To access and evaluate the information from the json I am trying to use jira-python in order to have a parser for the jira json's. The code is as follows:
jira = JIRA('https://some_url/jira', basic_auth=('user','password'))
which results in an error like follows:
WARNING:root:[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) while doing GET https://some_url/jira/rest/api/2/serverInfo [{'params': None, 'headers': {'User-Agent': 'python-requests/2.12.4', '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'}}]
Why do I have a certificate error when trying to access the JIRA with python, but I do not when using curl? And how to fix this?