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

Created on 18 Sep 2014  路  12Comments  路  Source: rust-lang/cargo

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!

Most helpful comment

A workaround from @alexcrichton:

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

All 12 comments

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

I think I found where the certs are located.

A workaround from @alexcrichton:

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

Confirmed fixed by #600!

Excellent! And thank you.

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

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

@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 :)

@alexcrichton sure thing

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings