This code works and prints out the list of projects accessible to anonymous user
---------------------This Works-----------
from collections import Counter
from jira import JIRA
import re
options = {
'server': 'https://jira.atlassian.com'}
jira = JIRA(options)
projects = jira.projects()
for v in projects:
print (v)
-------------------------THIS DOES NOT WORK-------
from collections import Counter
from jira import JIRA
import re
options = {
'server': 'https://jira.atlassian.com'}
jira = JIRA(options, basic_auth=('username', 'password'))
projects = jira.projects()
for v in projects:
print (v)
-------------------------------------ERROR-------------------
WARNING:root:Got recoverable error from GET https://jira.atlassian.com/rest/api/2/serverInfo, will retry [1/3] in 17.384401903628806s. Err: 401
WARNING:root:Got recoverable error from GET https://jira.atlassian.com/rest/api/2/serverInfo, will retry [2/3] in 36.83359655277892s. Err: 401
WARNING:root:Got recoverable error from GET https://jira.atlassian.com/rest/api/2/serverInfo, will retry [3/3] in 58.065338652808876s. Err: 401
-------------------------------------------------------
Please help with answer