2016-04-18 168 views
3

試圖通過Web Services API v2.0通過pyral 1.1.1和ActivePython 2.7.10.12(ActiveState Software Inc.)訪問rally1.rallydev.com,在公司文件牆後面。我收到錯誤「pyral.context.RallyRESTAPIError:SSL證書驗證失敗」pyral錯誤「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:\Users\QvaleL\Documents\Eclipse Workspace\Extract Rally Data\PullRallyUS - Working.py", line 26, in <module> 
    rally = Rally(server, user, password, workspace=workspace, project=project) 
    File "C:\Python27\lib\site-packages\pyral\restapi.py", line 228, in __init__ 
    self.contextHelper.check(self.server) 
    File "C:\Python27\lib\site-packages\pyral\context.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:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.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:\Users\QvaleL\Documents\Eclipse Workspace\Extract Rally Data\PullRallyUS - Working.py", line 25, in <module> 
    rally = Rally(server, user, password, workspace=workspace, project=project, verify_ssl_cert=False) 
    File "C:\Python27\lib\site-packages\pyral\restapi.py", line 228, in __init__ 
    self.contextHelper.check(self.server) 
    File "C:\Python27\lib\site-packages\pyral\context.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) 
+0

Hey @Les。如果您將自己的帖子寫成明確的,可回答的問題,則更有可能得到答案。現在,這是一個錯誤報告:讀者不知道你想要什麼幫助,你需要達到什麼,也不知道錯誤是爲什麼。讀者也不知道你已經做了什麼來調查問題,也不知道你自己解決問題。通過一點點編輯,你應該看到一些看起來像棘手問題的良好迴應。 :) –

+0

你有沒有找到解決方案?我也有同樣的問題。 – qutab

回答

1

解決方案是要導出的環境變量https_proxy = [您的HTTPS代理SERVER_IP:端口]在您的環境中或通過Python程序。要從Python程序內導出,請使用以下命令語法與[您的https proxy-server_IP:port]:

os.environ['https_proxy'] = '100.100.101.200:8080' 
相關問題