cargo下载失败报SSL connect error


现象:

cargo build 时下载失败(Windows 10 x64, build 1903),提示:

warning: spurious network error (2 tries remaining): [35] SSL connect error (schannel: next InitializeSecurityContext fa
iled: Unknown error (0x80092013)
error: failed to download from `https://crates-io.proxy.ustclug.org/api/v1/crates/chrono/0.4.9/download`
Caused by:
[35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013)
分析:
用curl -v https://crates-io.proxy.ustclug.org/api/v1/crates/chrono/0.4.9/download
提示:
* schannel: shutting down SSL/TLS connection with crates-io.proxy.ustclug.org port 443
* schannel: clear security context handle
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - 由于吊销服务器已脱机,吊销功能
无法检查吊销。
 
而用curl -kv https://crates-io.proxy.ustclug.org/api/v1/crates/chrono/0.4.9/download
curl -v --ssl-no-revoke https://crates-io.proxy.ustclug.org/api/v1/crates/chrono/0.4 .9/download
可以下载。
 
解决方案:
在~/.cargo/config中加入
[http]
check-revoke = false
 
或者:
调置环境变量CARGO_HTTP_CHECK_REVOKE=false


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM