我的组织使用 SSO 身份验证。尝试使用 python 中的 api 密钥通过 pyral 连接集会时出现错误。不知道我做错了什么。任何帮助表示赞赏!我在 sample.py 文件中使用以下代码(唯一的变化是我输入了 API 密钥值、工作区名称和项目名称) -
import sys
from pyral import Rally, rallyWorkset
options = [arg for arg in sys.argv[1:] if arg.startswith('--')]
args = [arg for arg in sys.argv[1:] if arg not in options]
server, user, password, apikey, workspace, project = rallyWorkset(options)
print(server)
rally = Rally('rally1.rallydev.com', apikey='<my api key>', workspace='<workspace name>', project='<project name>')
rally.enableLogging('mypyral.log')
workspaces = rally.getWorkspaces()
for wksp in workspaces:
print("%s %s" % (wksp.oid, wksp.Name))
projects = rally.getProjects(workspace=wksp.Name)
for proj in projects:
print("%12.12s %s" % (proj.oid, proj.Name))
我得到的错误 -
rally1.rallydev.com
Traceback (most recent call last):
File "sample.py", line 10, in <module>
rally = Rally('rally1.rallydev.com', apikey='<my api key>', workspace='<workspace name>', project='<project name>')
File "C:\...\Python\Python36\lib\site-packages\pyral\restapi.py", line 259, in __init__
self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)
File "C:\...\Python\Python36\lib\site-packages\pyral\context.py", line 171, in check
user_response = self._getUserInfo()
File "C:\...\Python\Python36\lib\site-packages\pyral\context.py", line 276, in _getUserInfo
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: Target Rally host: 'rally1.rallydev.com' non-existent or unreachable