Rustup: Problem with installing rustup-rs on Windows

Created on 14 Jul 2016  路  14Comments  路  Source: rust-lang/rustup

I have a problem with installing rustup.rs on my Windows machine at work.
Configuration: Windows 7 Enterprise x64 SP1
Version of rustup-init: rustup-init 0.2.0 (57f335a 2016-06-21)

My machine works behind a proxy so that's can be a reason of the problem.

If I run ./rustup-init.exe I got following output:
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\Users\oleg\.multirust\tmp\m51gbmnxzt7hj98l_file' info: caused by: http request returned failure: [35] SSL connect error

Command RUSTUP_USE_HYPER=1 ./rustup-init.exe produces:
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc' error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\Users\oleg\.multirust\tmp\cshl3tis_w_u4t2b_file info: caused by: failed to make network request info: caused by: other os error info: caused by: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. (os error -2146762487)

Looks like I have to register some certificate.

Most helpful comment

@HaronK
I am also running Windows 7 Enterprise x64 at work.
Here are the steps I took and I was able to get rustup to work.

  1. Visit https://static.rust-lang.org/ and download the root certificate to your machine
  2. Install the root certificate by double clicking and clicking Next throughout the screens.
  3. Run:
SET RUSTUP_USE_HYPER=1
rustup-init.exe

All 14 comments

Here's the COMODO authority cert that rust-lang uses, and here's the rust-lang.org wildcard cert.

If you add one of these to your system root certs I'd expect rustup to work. Since this is a work computer, I'm guessing there's a work reason you don't have the COMODO cert, and suggest trying to add the rust-lang.org cert directly.

I haven't modified the Windows cert store myself, but these instructions look like a start: https://msdn.microsoft.com/en-us/library/windows/hardware/ff553506(v=vs.85).aspx

I have checked existing certificates and it appears that I already have Comodo certificate.
I was trying to register Rust-lang certificate you mentioned above from command line but it doesn't work. I've used following command line:

certmgr /c/add rust-lang-cert.pem /s root

Then I open rust-lang.org site in Internet Explorer and in the address line I open site certificate information and install it from there. Is this correct certificate? Because it still doesn't work for me and I get same error message when I run rustup-init.exe.

@HaronK Yes, the cert from www.rust-lang.org should be the right one.

I am having the same issue with rustup-init 1.0.0 (17b6d21 2016-12-15):

info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
error: could not download file from 'https://static.rust-lang.org/dist/channel-r
ust-nightly.toml.sha256' to 'C:\Users\tross07\.rustup\tmp\iuseih0n5am21676_file
info: caused by: error during download
info: caused by: [35] SSL connect error (schannel: next InitializeSecurityContex
t failed: Unknown error (0x80092012) - The revocation function was unable to che
ck revocation for the certificate.)
info: backtrace:

stack backtrace:
   0:   0x541796 - <no info>
   1:   0x507718 - <no info>
   2:   0x4da44c - <no info>
   3:   0x4a0ded - <no info>
   4: 0x771ec96f - RtlReAllocateHeap
   5: 0x771de0a3 - RtlFreeHeap
   6: 0x771ec983 - RtlReAllocateHeap
   7: 0x771ec83a - RtlReAllocateHeap
   8:   0x723ed3 - <no info>
   9:   0x6ea557 - <no info>
  10: 0x771de0a3 - RtlFreeHeap

I have installed both certificates as suggested to no avail.

I have the similar problem when I try run:
rustup install stable-msvc

The error is:

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\Users\Marco\.rustup\tmp\0rtlj86tx2d09z1u_file
info: caused by: error during download
info: caused by: [35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - Il server di revoca 茂驴陆 offline. La funzione richiamata non 茂驴陆 in grado di completare il controllo di revoca.)

S.O.: Windows 7

RESOLVE: I open the url https://static.rust-lang.org on IExplorer and install the certificate

For my windows10, I add the https_proxy into system environment variables and resolve this issue:
name: https_proxy
value: http://xxx.xxx.com:port

It would be great if we can have an option like in https://github.com/rust-lang/cargo/pull/3699/files

I'm having this issue behind a proxy in a corporate environment. Turning SSL Verify off works in cargo for me.

Yes, same for me. Cargo has a config file where I must add http.check-revoke = false and a proxy address e.g. http.proxy = "127.0.0.1:3128" to get it to work.

It is urgently need in company environments with proxys with Microsofts NTLM auth. We can not change the company proxys, so please adapt the rust-tools.
It took lots of months to get the revoke-option into cargo, so please rustup-team just learn from cargo....

@worker2345234

Same, I set http.proxy = "127.0.0.1:3128". check-revoke=false and also need to cainfo = "cert.pem"

https://github.com/seanmonstar/reqwest/issues/185

See this for debug information on the same setup

@HaronK
I am also running Windows 7 Enterprise x64 at work.
Here are the steps I took and I was able to get rustup to work.

  1. Visit https://static.rust-lang.org/ and download the root certificate to your machine
  2. Install the root certificate by double clicking and clicking Next throughout the screens.
  3. Run:
SET RUSTUP_USE_HYPER=1
rustup-init.exe

Sorry to revive this fairly old issue, but I'm seeing this error via Ansible for our Mac deployments. The error message is as follows:

Failed to validate the SSL certificate for static.rust-lang.org:443.
Make sure your managed systems have a valid CA certificate installed.
You can use validate_certs=False if you do not need to confirm the servers
identity but this is unsafe and not recommended. Paths checked for this platform:
/etc/ssl/certs, /etc/ansible, /usr/local/etc/openssl.
The exception msg was:
[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590).

Does anyone know what could be causing this?

For my windows10, I add the https_proxy into system environment variables and resolve this issue:
name: https_proxy
value: http://xxx.xxx.com:port

This one works for linux too if you are on a proxy that is.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

durka picture durka  路  3Comments

netgusto picture netgusto  路  4Comments

lilred picture lilred  路  3Comments

fenhl picture fenhl  路  4Comments

daboross picture daboross  路  4Comments