Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aj9411 opened this issue Jul 27, 2023 · 1 comment
Open

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

aj9411 opened this issue Jul 27, 2023 · 1 comment

Comments

@aj9411
Copy link

aj9411 commented Jul 27, 2023

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?

@amsam0
Copy link

amsam0 commented Aug 8, 2023

This might be caused by using the sparse registry protocol. I've opened a separate issue for that: #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants