我正在尝试在 Python-jira 的帮助下进行基本身份验证并编写了以下代码
from jira import JIRA
SERVER="https://jira.company.com"
user = user@company.com
apikey='api_token'
class create_issue:
def check_authentication(self):
print("inside the check authentication method@@@@@@@")
jira = JIRA(options, basic_auth=(user, apikey)) # username is email-ID and apikey is the JIRA api-token
ci= create_issue()
ci.check_authentication()
我收到以下错误
WARNING:root:Got recoverable error from GET https://jira.company.com/rest/api/2/serverInfo, will retry [1/3] in 13.772170596345521s. Err: 401
之前尝试使用不推荐使用的用户名和密码,后来更改为 api_key 而不是密码。但仍然遇到问题。任何人都可以帮助解决这个问题。当我使用网站使用相同的身份验证时,它正在工作。
谢谢, 普尼斯