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