可以使用http请求for portainer.io [ssl:cetide_verify_failed]
因此,我的任务是编写一个可以与portainer.io的API互动的程序。问题是,我会发现错误:
最大检索超过了url: /api /auth(由sslerror引起(sslcertverificationerror(1,'[ssl:certift _verify_failed]]证书验证验证失败:无法获得本地发行者证书(_SSSL.C:1091)')
最大检索超过了url: /api /auth(由sslerror引起(sslcertverificationerror(1,'[ssl: certif 喜欢:
import requests
URL = "https://localhost:9443"
data_auth = {
"password": "password",
"username": "username"
}
url_auth = URL + "/api/auth"
auth_response = requests.post(url_auth, data_auth)
print(auth_response)
有人知道如何解决此错误吗?我应该创建自己的SSL证书吗?我在这里迷路了。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请求
,如果将验证设置为false,也可以忽略验证SSL证书。现在了解这是 bad ,您永远不要忽略您的SSL证书。但是对于本地发展而言,这就是如何超越它。
requests
can also ignore verifying the SSL certificate if you set verify to False.Now understand this is bad, you should never ignore your SSL certs. But for development locally this is how to get past it.