试图通过带pyral 1.1.1和ActivePython 2.7.10.12(ActiveState Software股份有限公司)的Web Services API v2.0从公司文件墙后面访问rally1.ralydev.com。我收到错误"pyral.context.RallyRESTAPIError:SSL证书验证失败"
Using Code with ssl:
rally = Rally(server, user, password, workspace=workspace, project=project)
Receive:
Traceback (most recent call last):
File "C:UsersQvaleLDocumentsEclipse WorkspaceExtract Rally DataPullRallyUS - Working.py", line 26, in <module>
rally = Rally(server, user, password, workspace=workspace, project=project)
File "C:Python27libsite-packagespyralrestapi.py", line 228, in __init__
self.contextHelper.check(self.server)
File "C:Python27libsite-packagespyralcontext.py", line 216, in check
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: SSL certificate verification failed
Using Code to turn off SSL:
rally = Rally(server, user, password, workspace=workspace, project=project, verify_ssl_cert=False)
Receive:
C:Python27libsite-packagesrequestspackagesurllib3connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
404 Response for request
('Connection aborted.', BadStatusLine("''",))
Traceback (most recent call last):
File "C:UsersQvaleLDocumentsEclipse WorkspaceExtract Rally DataPullRallyUS - Working.py", line 25, in <module>
rally = Rally(server, user, password, workspace=workspace, project=project, verify_ssl_cert=False)
File "C:Python27libsite-packagespyralrestapi.py", line 228, in __init__
self.contextHelper.check(self.server)
File "C:Python27libsite-packagespyralcontext.py", line 216, in check
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: 404 Target host: 'rally1.rallydev.com' doesn't support the Rally WSAPI
已安装Python包
c:>pip list
certifi (2016.2.28)
pip (8.1.1)
pypm (1.4.3)
pyral (1.1.1)
pythonselect (1.3)
pywin32 (218.3)
requests (2.9.1)
setuptools (5.2)
virtualenv (1.11.6)
解决方案是在您的环境中或通过Python程序导出环境变量https_proxy=[your https-proxy-server_IP:port]。要从Python程序中导出,请使用以下命令语法和[your https proxy-server_IP:port]:
os.environ['https_proxy'] = '100.100.101.200:8080'
我也有类似的问题,我们的网络团队对拉力赛网站进行了几次检查,结果成功了。已清除SSL验证。
这可能对你没有帮助,但我就是这样解决的,因为没有其他解决方案对我有效。