Skip to content

Clean updating the crates.io index sets 'refs/remotes/origin/' to HEAD insted of master #411

Description

@meltinglava

Running any cargo add {crate} would fail with:

Command failed due to unhandled error: reference 'refs/remotes/origin/master' not found; class=Reference (4); code=NotFound (-3)

After some debugging i found that the cargo index had its 'refs/remotes/origin' set to HEAD instead of master. I tried rebuilding the index by running rm -rf ~/.cargo/registry/index/github.com-*/ and then cargo add <any dependency>. This updated the index, however now refs/remotes/origin/ still contains HEAD insted of master.

Found the line in that failed in this lib to be:

.find_reference("refs/remotes/origin/master")?

Confirmed that running mv HEAD master temporarily fixed the problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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