How to fix cargo error "failed to find branch `master`"?

Viewed 292

With rust 1.52, I run:

cargo install --git https://gitlab.com/seaofvoices/darklua.git

which results in this error output:

error: failed to find branch `master`

Caused by:
  cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)

This repo never had a branch called "master", and I don't see a way to specify a differently-named HEAD branch.

1 Answers

This was a missing feature in rust before version 1.55. The fix was merged into cargo in this pull request: https://github.com/rust-lang/cargo/pull/8522

And made it's way into the rust 1.55 release. When running the above commands with rust 1.55, the command executes successfully.

Related