kbknapp / cargo-outdated

A cargo subcommand for displaying when Rust dependencies are out of date
MIT License
1.2k stars 94 forks source link

SSL peer certificate or SSH remote key was not OK #306

Open manfredlotz opened 2 years ago

manfredlotz commented 2 years ago

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

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

kbknapp commented 2 years ago

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?

manfredlotz commented 2 years ago

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?