Proxy for rustup-init
static.rust-lang.org has been blocked in China,so I got these errors when I run the install script.But I do set the https_proxy environment variable.
info: profile set to 'default'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/home/coder/.rustup/tmp/4b1904fg7mmuknsu_file'
error: caused by: failed to make network request
error: caused by: https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256: timed out
Hi,
In theory our downloader should honour https_proxy settings if they're formatted correctly. Could you tell me the shape, if not the exact value, of your setting? e.g. is it of the for some.ip:port or of the form http://some.ip:port or similar?
On my machine it works only without the http:// prefix, so some.ip.port. Unfortunately this scheme does not work with several other tools.
Is there any progress on this issue please? I encoutered the same issue even if I changed the apt repo to mirrors.ustc.edu.cn with http_proxy in "http_proxy=http://some_ip:port".
info: downloading installer info: profile set to 'default' info: default host triple is aarch64-unknown-linux-gnu info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu' error: could not download file from 'https://mirrors.ustc.edu.cn/rust-static/dist/channel-rust-stable.toml.sha256' to '/root/.rustup/tmp/c2dboqadkdi1rll3_file' error: caused by: failed to make network request error: caused by: https://mirrors.ustc.edu.cn/rust-static/dist/channel-rust-stable.toml.sha256: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1915: (certificate is not yet valid) error: caused by: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1915: (certificate is not yet valid)
Is there any progress on this issue please? I encoutered the same issue even if I changed the apt repo to mirrors.ustc.edu.cn with http_proxy in "http_proxy=http://some_ip:port".
info: downloading installer info: profile set to 'default' info: default host triple is aarch64-unknown-linux-gnu info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu' error: could not download file from 'https://mirrors.ustc.edu.cn/rust-static/dist/channel-rust-stable.toml.sha256' to '/root/.rustup/tmp/c2dboqadkdi1rll3_file' error: caused by: failed to make network request error: caused by: https://mirrors.ustc.edu.cn/rust-static/dist/channel-rust-stable.toml.sha256: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1915: (certificate is not yet valid) error: caused by: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1915: (certificate is not yet valid)
你应该设置 https_proxy=http://some_ip:port 才对
Seems like win10 wsl dosen't use the environment variable
@CoderYellow To be fair, you've successfully redirected to your proxy as evidenced by the URLs it tried to download -- your proxy has bad SSL certificates, or else your computer has bad timing because it's complaining the certificate provided by mirrors.ustc.edu.cn is NOT YET VALID.
you may try
$proxy='http://localhost:10809'
$ENV:HTTP_PROXY=$proxy
$ENV:HTTPS_PROXY=$proxy
cd ~\Downloads
.\rustup-init.exe
you may try
$proxy='http://localhost:10809' $ENV:HTTP_PROXY=$proxy $ENV:HTTPS_PROXY=$proxy cd ~\Downloads .\rustup-init.exe
It works for me on windows11.
I guess @jiangying000's https://github.com/rust-lang/rustup/issues/2095#issuecomment-1739843869 has pretty much summed it up. As such, I'm closing this issue for now.
Apart from setting the proxy, you might as well try the TUNA mirror, but please don't do both!