Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to install JIRA Python?

Bharath kumar February 27, 2019

Hello everyone,

I'm trying to install the Jira Python API in my machine, i tried to download the package from https://pypi.org/project/jira/, however when i try to install it with pip in python, it says some files are missing.

Could anyone recently installed it, please help me to fix the issue. Also, is it necessary to do any other tools installation before?

 

PS: PIP is properly configured & its installing, i tried to deploy another package & it installed without any error.

1 answer

0 votes
Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

When I installed it, I used the easy_install jira command and didn't have any trouble.

Bharath kumar February 27, 2019

Hey thanks for the answer. Actually i figured that issue.

But now when i try to retrieve jira details, i have certificate failure issue. Any idea how to fix it?

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

I had to save a local copy of the cert (exported via a browser), and then reference it in my script, e.g.

server = 'https://<JIRA_INSTANCE>'
root_cert_file = 'c:/users/rseale/Documents/MYCERT.crt'

username = 'bob'
password = 'abc123'

jira_options = {
'server': server,
'verify': root_cert_file
}

jira = JIRA(options=jira_options, basic_auth=(username,password))
Bharath kumar February 27, 2019

I used this directly on the code. When i executed it, i got certificate validation failure.

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

And you exported your site's certificate, saved it to your file system, and point to it in your code?

Bharath kumar February 27, 2019

I don't know where that certificate exists! Any clue for that?

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2019

You can export it by visiting your instance in a browser. Search for "export certificate from browser" for guidance, depending upon your browser.

Bharath kumar February 27, 2019

Thanks will do that tomorrow and keep you posted.

Bharath kumar February 28, 2019

i fail to do that, what do you mean by "your instance" in your message? also, i would like to understand if the certificate issue is about user authentication or something specific to JIRA itself.

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2019

By "your instance" I mean the URL you go to in your browser when you access Jira, e.g. https://jira.mycompany.com, etc. The certificate has nothing to do with user authentication; that is a separate step, shown in my code snippet.

Bharath kumar February 28, 2019

Ah okay. Yes i know the url of my company's jira portal. But am not sure about the certificate part.

Bharath kumar March 1, 2019

Finally i got the SSL certificate from my admin team. and it works perfectly! Thanks for your help.

However, i need your help on another topic, how to resolve the maxresults issue to retrieve more than 50 tickets? i came across some threads where they just ask to use jsql, but is it the only solution? because for my case, am not using jsql in python. however with jira.search_issues i tried to used maxresults which didn't work.

 

any suggestions or thoughts on this?

Bharath kumar March 1, 2019

just figured the issue. thanks :)

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2019

Cool; glad you're good to go. Since your Python API installation and SSL issues are wrapped up, I'd ask that you accept this answer to help others down the road that have similar issues, and if you have more questions related to your Python adventures, post them as new questions.

Thanks!

Payne

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events