我正在尝试连接到服务器,执行以下操作:
nexus_config = nexuscli.nexus_config.NexusConfig(username=NEXUS_USER,
password=NEXUS_PASSWORD,
url=NEXUS_URL,
x509_verify=True)
nexus_client = nexuscli.nexus_client.NexusClient(config=nexus_config)
print(nexus_client.repositories.list)
但是,我得到了一个错误:
nexuscli.exception.NexusClientConnectionError: HTTPSConnectionPool(host='my_site.net', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)')))
https://nexus3-cli.readthedocs.io/en/latest/nexuscli.html#module-nexuscli.nexus_config
在请求库中使用API端点检查URL并设置validate=False
会得到一个警告,并且确实有效
因此,我将代码更改为:x509_verify=True
,希望从请求中得到同样的警告,但我得到的是警告
我有什么遗漏吗?或者图书馆里有个bug? 谢谢各位
nexuscli.exception.NexusClientAPIError: <exception str() failed>
您将获得异常:
NexusClientAPIError
。根据documents报告:我认为您的代码很好,
x.509
证书的问题已经解决,问题可能在服务器端相关问题 更多 >
编程相关推荐