gpt4 book ai didi

python - Databricks CLI : SSLError, 找不到本地颁发者证书

转载 作者:行者123 更新时间:2023-12-04 22:34:41 26 4
gpt4 key购买 nike

我已经安装并配置了 Databricks CLI,但是当我尝试使用它时,我收到一条错误消息,指出它找不到本地颁发者证书:

$ dbfs ls dbfs:/databricks/cluster_init/
Error: SSLError: HTTPSConnectionPool(host='dbc-12345678-1234.cloud.databricks.com', port=443): Max retries exceeded with url: /api/2.0/dbfs/list?path=dbfs%3A%2Fda
tabricks%2Fcluster_init%2F (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer
certificate (_ssl.c:1123)')))
上述错误是否表明我需要安装证书,或者以某种方式配置我的环境以便它知道如何找到正确的证书?
我的环境是带有 WSL(Ubuntu 20.04)的 Windows 10(上面的命令来自 WSL/Ubuntu 命令行)。
Databricks CLI 已安装到 Anaconda 环境中,包括以下证书和 SSL 包:
$ conda list | grep cert
ca-certificates 2020.6.20 hecda079_0 conda-forge
certifi 2020.6.20 py38h32f6830_0 conda-forge
$ conda list | grep ssl
openssl 1.1.1g h516909a_1 conda-forge
pyopenssl 19.1.0 py_1 conda-forge
当我尝试将 REST API 与 curl 一起使用时,我遇到了类似的错误:
$ curl -n -X GET https://dbc-12345678-1234.cloud.databricks.com/api/2.0/clusters/list
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

最佳答案

这个问题可以通过禁用 SSL 证书验证来解决。在 Databricks CLI 中,您可以通过指定 insecure = True 来执行此操作。在您的 Databricks 配置文件中 .databrickscfg .

关于python - Databricks CLI : SSLError, 找不到本地颁发者证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63888000/

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