Using the JIRA python module this example works:
from jira import JIRA
jira = jira = JIRA(basic_auth=(un, pwd), options={'server': server})
issue = jira.issue('JRA-9')
print(issue.fields.project.key) # 'JRA'
print(issue.fields.issuetype.name) # 'New Feature'
print(issue.fields.reporter.displayName) # 'Mike Cannon-Brookes [Atlassian]'
Hi,
ReplyDeleteI tried this code. I am getting syntax error
Plz write me the error code
ReplyDeleteyou should use the following format:
ReplyDeletejira = JIRA(basic_auth=(un, pwd), options={'server': server})
you need to pass in the server details as a connection option when you are specifying basic_auth.
in the example above, un pwd and server are all string variables.
You haven't setup your dictionary correctly in the example above, you just specified the url as a key with no value, instead of a key/value pair.
ReplyDeleteOptions should be:
options = {'server': 'https://myaccount.atlassian.net'}
For 'https://jira.mycompany.com' it is unable to authenticate. And gives 404 error
ReplyDeletehi,
ReplyDeletei got the same problem to authenticate "https://jira.mycompanyname'
with HTTP 404 error
jira = JIRA(basic_auth=('username', 'pw'), options={'server':'https://jira.mycompany.net','verify':False})
jira.exceptions.JIRAError: JiraError HTTP 404
any suggestions to fix this?
Thanks
JIRA 5.0, REST API, jira-python, Start/End Date
ReplyDeletehttps://thepythoncoding.blogspot.com/2019/07/jira-50-rest-api-jira-python-startend.html
When I try:
ReplyDeletejac = JIRA(basic_auth=(userID, passwd), options={'server': server+':'+port})
I get the following error:
WARNING:root:HTTPSConnectionPool(host=server, port=port): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),)) while doing GET https://server:port/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.22.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}]
where server and port have been provided and confirmed with our IT department... any ideas what I'm doing wrong?
Standard basic authentication is now deprecated in Jira from June 2019. An API key is required which can be generated from: 'https://confluence.atlassian.com/cloud/api-tokens-938839638.html'.
ReplyDeleteOnce the key has been obtained, replace your current Jira object with the following:
jira = JIRA(basic_auth=("enter username", "enter API KEY"), options={'server': "enter server"}).
This should work as it has worked for me.
How to add API token as authentication menthod instead of providing username and password in text format
ReplyDeleteWhen you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. college confidence
ReplyDeleteThe information which you have provided in this blog is really useful to everyone. Thanks for sharing.
ReplyDeletePython Training in Hyderabad
he list of your blogs is very helpful for those who want to learn, It is amazing!!! You have been helping many application for python.
ReplyDeleteDevOps Training in Bangalore | Certification | Online Training Course institute | DevOps Training in Hyderabad | Certification | Online Training Course institute | DevOps Training in Coimbatore | Certification | Online Training Course institute | DevOps Online Training | Certification | Devops Training Online
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteThis idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.
oracle training in chennai
oracle training institute in chennai
oracle training in bangalore
oracle training in hyderabad
oracle training
oracle online training
hadoop training in chennai
hadoop training in bangalore
thanks for your comments
ReplyDeleteSite original
ReplyDelete