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

Cargo: "The SSL certificate is invalid" for GitHub under Ubuntu 10.04 #598

Closed
emk opened this issue Sep 18, 2014 · 12 comments
Closed

Cargo: "The SSL certificate is invalid" for GitHub under Ubuntu 10.04 #598

emk opened this issue Sep 18, 2014 · 12 comments

Comments

@emk
Copy link

emk commented Sep 18, 2014

Found while working on emk/heroku-buildpack-rust on Heroku, which runs 10.04. Folks at Heroku verify it deploys fine with 14.04, and it works locally with 12.04.

    Updating git repository `https://github.com/reem/rust-unsafe-any.git`
Unable to update https://github.com/reem/rust-unsafe-any.git#75cff194

Caused by:
  failed to clone into: /tmp/cargo_ASPp/.cargo/git/db/rust-unsafe-any-3633b05955fd77c7

Caused by:
  [16] The SSL certificate is invalid

Thank you for looking at this!

@alexcrichton
Copy link
Member

This is likely because ubuntu 12+ have openssl 1.0.1 and ubuntu 10 has 0.9.8, still investigating...

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Sep 18, 2014
This *should* help with rust-lang#598, but I'd like to confirm that it's fixed with a
snapshot before marking it as fixed.
@alexcrichton
Copy link
Member

I think I found where the certs are located.

@emk
Copy link
Author

emk commented Sep 18, 2014

A workaround from @alexcrichton:

export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

bors added a commit that referenced this issue Sep 19, 2014
This *should* help with #598, but I'd like to confirm that it's fixed with a
snapshot before marking it as fixed.
@alexcrichton
Copy link
Member

Confirmed fixed by #600!

@emk
Copy link
Author

emk commented Sep 19, 2014

Excellent! And thank you.

@WhoAteDaCake
Copy link

Still having the same issue on Ubuntu 16.04
cargo:
cargo 0.16.0-nightly (3568be9 2016-11-26

@eguiraud
Copy link

eguiraud commented Dec 6, 2017

Encountered the same issue with the cargo binaries for linux 64 bit on Debian 9.2

The workaround mentioned above still works:

export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

@alexcrichton
Copy link
Member

@WhoAteDaCake and @bluehood mind opening a new issue with more details? That'll hopefully get more visibility as I think more people would follow new issues than 3 year old issues :)

@eguiraud
Copy link

eguiraud commented Dec 6, 2017

@alexcrichton sure thing

@sirdody
Copy link

sirdody commented May 22, 2018

I encountered this issue today on Arch Linux (4.16):

$cargo run
Downloading rand v.0.5.0
error: Unable to get packages from source
Caused by: 
  [60] Peer certificate cannot be authenticated with given CA certificates (SSL certificate problem: certificate is not yet valid)

I tried

 export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt 

but without success.

@sfackler
Copy link
Member

Has your clock drifted significantly? That error is saying that your computer thinks crates.io's certificate is issued in the future.

@sirdody
Copy link

sirdody commented May 22, 2018

Yeah, my local time is incorrectly set in my arch linux. It works after fixing. Thanks

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

6 participants