繁体   English   中英

无法使用p4python连接到启用了SSL的perforce服务器

[英]Cannot connect to a ssl-enabled perforce server using p4python

Python版本:2.7.8 P4Python版本:P4PYTHON / NTX86 / 2014.1 / 807760(2014.1 / 807760 API)(2014/03/18)客户端操作系统:Win2k8 Server

Python脚本:

from P4 import P4, P4Exception
p4agent = P4()
p4agent.port = "ssl:my-perforce-server.com:1666"
p4agent.user = "abc"
p4agent.password = "a$3"
p4agent.connect()
p4agent.run_login()

输出:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 44, in <module>
    getLatestRevision()
  File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 41, in getLatestRevision
    initP4()
  File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 36, in initP4
    p4agent.connect()
  File "c:\python27\lib\site-packages\P4.py", line 678, in connect
    P4API.P4Adapter.connect( self )
P4Exception: [P4.connect()] Connect to server failed; check $P4PORT.
SSL library must be at least version 1.0.1.

p4agent.identify()输出:

Perforce - The Fast Software Configuration Management System.
Copyright 1995-2014 Perforce Software.  All rights reserved.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)
See 'p4 help legal' for full OpenSSL license information
Version of OpenSSL Libraries: OpenSSL 1.0.1d 5 Feb 2013
Rev. P4PYTHON/NTX86/2014.1/807760 (2014.1/807760 API) (2014/03/18).

OpenSSL(lib)的路径在Path变量中设置。

我还检查了客户端计算机上的“ p4 set”(尝试从中连接到perforce服务器),并且看到所有环境变量都已正确设置。

有人可以让我知道如何解决这个问题吗?

我相信问题是您连接了错误的Openssl库。 P4.identify()的输出具有误导性:这是使用API​​编译的OpenSSL的版本,而不是您要链接的版本。

您从哪里获得该版本的P4Python? 您是自己编译的还是从其他网站下载的?

如果要为Windows Python 2.7和3.4 32位和64位使用现成的P4Python版本,请查看https://swarm.workshop.perforce.com/projects/p4pythonlib/files/p4pythonlib/bin 如果您对这些版本有任何疑问,请告诉我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM