货物添加"由于未处理的错误,命令失败:找不到参考'refs/remotes/origin/master'"



我得到

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

尝试添加货物时。

我已经删除了~/.cargo/registry,并通过rustup重新安装,但运气不好。当我做cargo add flexbuffers时会抛出它,但它并不局限于那个包——它不适用于其他包,例如serde。

我不得不:

mv ~/.cargo/registry/index/github.com-*/.git/refs/remotes/origin/HEAD 
~/.cargo/registry/index/github.com-*/.git/refs/remotes/origin/master

因为这个问题。

最新更新