cargo-edit
cargo-edit copied to clipboard
cargo upgrade fails when replacing crates-io with another registry
Hello, I am not using crates-io, my config.toml looks like this:
[registries]
my-registry = { index = "sparse+https://<my-registry-package-endpoint>" }
[source.crates-io]
replace-with = "my-registry"
I can build fine with cargo build, cargo update works fine to update my Cargo.lock file, but running cargo upgrade -v is failing with this error:
Error: The repo at path ....\.cargo\registry\index\<repo url> is unusable due to having an invalid HEAD reference: reference 'refs/heads/master' not found; class=Reference (4); code=NotFound (-3)
Any ideas on what I could do to get past this problem?
This might be caused by using the sparse registry protocol. I've opened a separate issue for that: #868