我已经使用以下示例python代码尝试并连接到我们项目的JIRA实例。
options = {
'server': 'http://172.16.48.15:8080'
}
jira = JIRA(options=options, basic_auth=('<username>', '<password>'))(我没有附加其余的代码,因为在尝试创建JIRA的实例时发生了这个问题)“用户名”和“密码”与我从浏览器访问JIRA时使用的是相同的。执行上面的代码后,我得到以下错误:
....The requested resource (/rest/api/2/serverInfo) is not available.....
http://172.16.48.15:8080/rest/api/2/serverInfo
Process finished with exit code 1有人能告诉我我犯了什么错误吗?我有权使用我的凭据访问此服务器。我可以使用浏览器连接到JIRA。任何帮助都将不胜感激。
谢谢M.H.
发布于 2014-10-29 07:40:02
您的服务器参数URL可能不正确。尝试确保Jira实际上托管在172.16.18.15:8080的根目录下。
发布于 2019-08-12 14:36:57
检查您是否也可以使用浏览器访问http://172.16.48.15:8080/rest/api/2/serverInfo。根据and服务器和/或JIRA设置的不同,rest api的路径可能会有所不同。
URI结构在Atlassian Documentation中定义为
http://host:port/context/rest/api-name/api-version/resource-namehttps://stackoverflow.com/questions/25805672
复制相似问题