cargo-outdated icon indicating copy to clipboard operation
cargo-outdated copied to clipboard

SSL peer certificate or SSH remote key was not OK

Open manfredlotz opened this issue 3 years ago • 2 comments

Ubuntu with rustc, v1.58.1, cargo-outdated 0.10.2

Running cargo outdated I get

error: failed to download from `https://crates.io/api/v1/crates/block-buffer/0.10.2/download`

Caused by:
  [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)

When creating a new user on the same system and

  • installing rust, cargo, cargo-outdated for that user
  • cloning the repository
  • then cargo outdated works just fine.

So, my guess is that something in ~/.cargo is wrong. If I knew what causes it I could perhaps cleanup things in ~/.cargo

manfredlotz avatar Feb 13 '22 14:02 manfredlotz

What distro are you using? It could be the root certificates were not yet installed, but after installing rust and cargo they were picked up?

kbknapp avatar Mar 02 '22 03:03 kbknapp

I am using Ubuntu.

When it didn't work rust and cargo were installed in ~/.cargo using rustup (initially installed some years ago).

I just deleted ~/.cargo and re-installed with rustup in ~/.cargo, and all is fine now. This is why I assumed that something got wrong in ~/.cargo.

Could it really be that some root certificates were installed in ~/.cargo which were not installed before?

manfredlotz avatar Mar 02 '22 03:03 manfredlotz