Problem with authentication to jira server

Hi all,

 

I am trying to write my first jira-python application and stuck at the very begin. Basically I am using the following code (taken from examples and modified a bit):

from jira import JIRA
from getpass import getpass

def main():
    options = {
        'server': 'https://jira.internal.server/'
    }
    password = getpass()
    jira = JIRA(options, basic_auth=('user1', password))

    # Get the mutable application properties for this server (requires
    # jira-system-administrators permission)
    # props = jira.application_properties()

    # Find all issues reported by the admin
    issues = jira.search_issues('assignee=user1')

    # Find the top three projects containing issues reported by admin
    from collections import Counter
    top_three = Counter(
        [issue.fields.project.key for issue in issues]).most_common(3)

if __name__ == "__main__":
    main()

 

But all I get is the following error:

WARNING:root:[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) while doing GET https://jira.internal.server/rest/api/2/serverInfo
 [{'headers': {'Connection': 'keep-alive', 'Accept': '*/*', 
'X-Atlassian-Token': 'no-check', 'Cache-Control': 'no-cache', 
'Content-Type': 'application/json', 'User-Agent': 'python-requests/2.7.0
 CPython/3.5.0 Windows/7', 'Accept-Encoding': 'gzip, deflate'}, 
'params': None}]

WARNING:root:Got recoverable error from GET https://jira.internal.server/rest/api/2/serverInfo, will retry [1/3] in 10s. Err: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646)

Can anybody tell me how to solve this problem ?

1 answer

1 accepted

I have found a way to workaround:

jira_options = {
    'server': "https://jira.cmc.local/",
    'verify': "False"
}

 

 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,945 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot