Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with installing rustup-rs on Windows #581

Closed
HaronK opened this issue Jul 14, 2016 · 15 comments
Closed

Problem with installing rustup-rs on Windows #581

HaronK opened this issue Jul 14, 2016 · 15 comments

Comments

@HaronK
Copy link

HaronK commented Jul 14, 2016

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.

@brson
Copy link
Contributor

brson commented Jul 14, 2016

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

@HaronK
Copy link
Author

HaronK commented Jul 15, 2016

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.

@brson
Copy link
Contributor

brson commented Jul 19, 2016

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

@ghost
Copy link

ghost commented Jan 13, 2017

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.

@drazde
Copy link

drazde commented Jan 20, 2017

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

@xiaoaiwhc
Copy link

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

@mmrath
Copy link

mmrath commented Jul 27, 2017

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

@ark-
Copy link

ark- commented Aug 17, 2017

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

@worker2345234
Copy link

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....

@ark-
Copy link

ark- commented Sep 5, 2017

@worker2345234

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

@ark-
Copy link

ark- commented Sep 5, 2017

seanmonstar/reqwest#185

See this for debug information on the same setup

@raymondsiu
Copy link

raymondsiu commented Jan 26, 2018

@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

@nre-ableton
Copy link

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?

@aditj
Copy link

aditj commented Jan 3, 2019

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.

@rami3l
Copy link
Member

rami3l commented Jun 9, 2024

@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

So looks like this is a backend-related issue (cc #3790).

Since the landscape of Rustup has changed quite a lot since then (RUSTUP_USE_HYPER is no longer relevant now, reqwest/native-tls is now the default, and RUSTUP_USE_CURL should be used to opt out), I'm closing this issue now as outdated. For further issues regarding the interactions between certificates and different backends, please report under #3806.

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests