Failing to install mdevctl using rust

cargo build
Updating crates.io index
error: failed to get anyhow as a dependency of package mdevctl v1.4.0 (/opt/mdevctl)

Caused by:
failed to query replaced source registry crates-io

Caused by:
download of config.json failed

Caused by:
failed to get successful HTTP response from https://index.crates.io/config.json (proxy ip), got 0
body:

You have configuration which overrides the crates.io URL and replaces it with a mirror or proxy, but the proxy is broken, or blocked, or misconfigured.

Check .cargo/config.toml file for the correct source replacement URL, or delete the source replacement if you don't need it.