1

I am trying to use the rest API functionalities in JIRA which is proviced by its python module. Here is the code :

from jira import JIRA
options = {
'server': 'https://jira.internal.server',
'verify': 'false'
}

jira = JIRA(options, basic_auth=('usernXXXX', 'PassXXXX'))

After this I am getting the error :

WARNING:root:[Errno 2] No such file or directory while doing GET 
https://jira.internal.server/rest/api/2/serverInfo [{u'headers': {'Accept-
Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-
Agent': 'python-requests/2.13.0', 'Connection': 'keep-alive', u'X-Atlassian-
Token': u'no-check', u'Cache-Control': u'no-cache', u'Content-Type': 
u'application/json'}, 'params': None}]

I have checked the URL through rest client and CUrl https://jira.internal.server/rest/api/2/serverInfo it gives me perfect result

can anyone help here??

2
  • Did you try using just the server string as the first parameter instead of the options dict? Commented Apr 6, 2017 at 15:23
  • yes it didnot work, also the documentation in JIRA shows the same format as to pass the parameters as dict Commented Apr 7, 2017 at 15:34

1 Answer 1

3
from jira import JIRA
options = {
'server': 'https://jira.internal.server',
'verify': False
}

jira = JIRA(options, basic_auth=('usernXXXX', 'PassXXXX'))

You need to change the 'false' to False, because in that case a boolean is needed, not a string. The best solution would be to provide the path to the CA like '/path/ca/cert.pem'. See requests SSL Cert Verification

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.