我试着用下面的代码连接Jira
*** Settings ***
Library JiraRobot
*** Test Cases ***
Test_Connect_Jira
Connect To Jira ${UserID} ${Pass} options= {'server':'${ServerName}'}
Log Get Current User我弄错了
[ WARN ] ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host')) while doing GET https://jira.xxx.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.24.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}]
[ WARN ] Got ConnectionError [('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))] errno:None on GET https://jira.xxx.com/rest/api/2/serverInfo
{'request': <PreparedRequest [GET]>, 'response': None}\{'request': <PreparedRequest [GET]>, 'response': None}
[ WARN ] Got recoverable error from GET https://jira.xxx.com/rest/api/2/serverInfo, will retry [1/3] in 0.531449693973s. Err: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))
[ WARN ] ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host')) while doing GET https://jira.xxx.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.24.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}]
[ WARN ] Got ConnectionError [('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))] errno:None on GET https://jira.xxx.com/rest/api/2/serverInfo
{'request': <PreparedRequest [GET]>, 'response': None}\{'request': <PreparedRequest [GET]>, 'response': None}
[ WARN ] Got recoverable error from GET https://jira.xxx.com/rest/api/2/serverInfo, will retry [2/3] in 3.70011506578s. Err: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))
[ WARN ] ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host')) while doing GET https://jira.xxx.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.24.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}]
[ WARN ] Got ConnectionError [('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))] errno:None on GET https://jira.xxx.com/rest/api/2/serverInfo
{'request': <PreparedRequest [GET]>, 'response': None}\{'request': <PreparedRequest [GET]>, 'response': None}
[ WARN ] Got recoverable error from GET https://jira.xxx.com/rest/api/2/serverInfo, will retry [3/3] in 50.5519016195s. Err: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))
[ WARN ] ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host')) while doing GET https://jira.xxx.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-Agent': 'python-requests/2.24.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}]
[ ERROR ] Execution stopped by user.
Authentication to JIRA unsuccessful. Ensure the user used has sufficient access and that Username and Password were correct
Process finished with exit code 253但我实际上是通过这些用户名和密码手动登录的。
有经验的人请帮帮我。
发布于 2020-12-24 01:55:33
我现在可以使用API令牌而不是密码来连接Jira。
https://stackoverflow.com/questions/64690810
复制相似问题