gpt4 book ai didi

python-3.x - 访问使用 webdav 客户端 python 加密的 nextcloud SSL 时出现问题

转载 作者:太空宇宙 更新时间:2023-11-03 14:32:09 33 4
gpt4 key购买 nike

我正在使用 python 脚本访问我的 nextcloud 服务器,一切都很酷,没问题,但我决定使用 SSL 自签名加密 nextcloud,然后我的脚本就开始了……Nextcloud 在 Apache 中被展示,它有指令

重定向“/”“https://IP

让所有请求转到 https。

我在 python 中使用带有此选项的 webdav 客户端

self.options = {'webdav_login':'user', 'webdav_password':'pass', 'webdav_hostname':  http://ip, 'webdav_root': 'nextcloud/remote.php/webdav'}

那些选项非常适合 http,但是当我尝试使用这些选项向 nextcloud 发出任何请求时,我得到 webdav 异常,例如 RemoteParentNotFound。

我试图改变 http://iphttps://ip ,但如果我这样做,pycurl 会引发异常 NotConnection。

有人可以帮助我让它工作或推荐我任何使用 python 上传、删除等到 nextcloud 的方法吗?

最佳答案

问题解决了。为了使 pycurl/webdav.client 验证成功,将证书附加到 Linux 中的/etc/ssl/cert/ca-certificate.crt。

关于python-3.x - 访问使用 webdav 客户端 python 加密的 nextcloud SSL 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51778459/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com