-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Useless error when ca-certificates are missing #5065
Comments
This happens on Windows as well, where ca-certificates.crt is not the solution. |
Ahh okay, thought it was just me. Yesterday it was working fine and today also got this same error (Win7 x64). Also tried meddling around in the cert-store without any success. |
Might this be due to https://github.com/blog/2507-weak-cryptographic-standards-removed ? If so, this might have just broken all Rust users on Windows 7... |
I am on Windows 7, and @retep998 pointed me to this Windows update's docs. I can confirm that applying the reg key mentioned there fixed it for me immediately. New-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp' -Name DefaultSecureProtocols -PropertyType DWORD -Value 0x00000800 |
We need to put out a huge announcement for this on the rust blog alerting all Windows 7 users to apply that fix, and also make it a prominent entry in any sort of FAQ or troubleshooting guide we have, along with alerts on all social media including twitter and reddit. There also needs to be a note on wherever we claim Rust supports Windows 7 about this. |
An additional thing we should do to reduce the impact of this in the future, whenever Cargo fails in this manner, it should check if it is on Windows 7, and if so check for those registry keys and their values. If the registry keys aren't set appropriately, it should give the user a really LOUD warning about how they need to fix their Windows 7 and provide detailed instructions on how to fix it. We could also implement this check in rustup itself, so even if someone is using an old version of Rust, as long as they used a recent rustup to get that old version of Rust, they would be alerted to this issue. |
Because this issue is technically supposed to be about poor error messages when |
@glandium where'd you acquire Cargo from and what Linux distribution were you using? Using the officially shipped binaries and Ubuntu I get:
so I'm not sure how to reproduce this :( |
I was using the debian packages. Arguably, the cargo package should depend on ca-certificates, and I might file a bug for that. |
@glandium you mention this reproduces with i386 but I was also unable to reproduce? Are these official builds or debian builds? |
Debian packages. |
Perhaps this is a misconfiguration in the debian build? Maybe a bug in the libgit2/openssl bindings? Sorry I'm not really sure how to go from this to a more narrow cause which can be fixed. |
I was able to reproduce with a fresh build of cargo from master by building with |
If that option isn't used does it work? If so then libgit2 version is probably mismatched as the crate is only compatible with one at a time |
It does.
If that's really the case, then it should fail to build if the wrong version is used. However, I'll note that I while I am reproducing when building with |
git2-rs by default doesn't use pkg-config and opting in is allowed for packages who have verified that the version works, but it looks like that hasn't been done here? In any case sounds like this is https://github.com/alexcrichton/git2-rs/issues/304, so I'm going to close in favor of that. |
I was trying to
cargo build
something in a newly created chroot and got the following output:Even with colors, this is not a great error message.
Strace hinted me that
/etc/ssl/certs/ca-certificates.crt
was missing, and sure enough, it worked after installing the ca-certificates package. But that wasn't thanks to cargo's error message.The text was updated successfully, but these errors were encountered: