repo error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)
时间: 2023-10-17 19:36:36 浏览: 321
这个错误"repo error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)"通常是因为在使用urllib库的urlopen方法打开一个https链接时,发生了SSL证书验证失败的错误。这个错误是由于打开的链接使用了自签名证书而引起的。
解决这个问题的方法是取消证书验证。可以通过设置ssl._create_default_https_context为ssl._create_unverified_context来全局取消证书验证。这样就可以绕过SSL证书验证,但也会降低安全性。
请注意,取消证书验证可能会带来一些安全风险,因为它不再验证服务器的身份。因此,我们建议在生产环境中仍然使用有效的SSL证书,并确保正确地配置证书链。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed问题解决](https://blog.csdn.net/qq_39613424/article/details/119616943)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [错误【ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed...】](https://blog.csdn.net/qq_36717487/article/details/127456007)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文