Skip to content

cargo upgrade fails when replacing crates-io with another registry #865

Open
@aj9411

Description

@aj9411

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions