我正在尝试使用JIRA中的restapi功能,它是由其python模块提供的。 代码如下:
from jira import JIRA
options = {
'server': 'https://jira.internal.server',
'verify': 'false'
}
jira = JIRA(options, basic_auth=('usernXXXX', 'PassXXXX'))
在此之后,我得到一个错误:
WARNING:root:[Errno 2] No such file or directory while doing GET
https://jira.internal.server/rest/api/2/serverInfo [{u'headers': {'Accept-
Encoding': 'gzip, deflate', u'Accept': u'application/json,*.*;q=0.9', 'User-
Agent': 'python-requests/2.13.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}]
我已经通过rest客户端和CUrlhttps://jira.internal.server/rest/api/2/serverInfo检查了URL 它给了我完美的结果
有人能帮忙吗??你知道吗
您需要将“false”更改为false,因为在这种情况下需要布尔值,而不是字符串。最好的解决方案是提供到CA的路径,如“/path/CA”/证书pem'. 参见请求SSL Cert Verification
相关问题 更多 >
编程相关推荐