gpt4 book ai didi

rust - 找不到 cargo 添加 `Command failed due to unhandled error: reference ' refs/remotes/origin/master'

转载 作者:行者123 更新时间:2023-12-03 11:31:32 24 4
gpt4 key购买 nike

我得到了

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

尝试添加 cargo 时。

我删除了 ~/.cargo/registry 并通过 rustup 重新安装,但没有成功。当我执行 cargo add flexbuffers 时抛出它,但它不仅限于那个包 - 它不适用于其他包,例如服务。

最佳答案

我必须:

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

因为this issue .

关于rust - 找不到 cargo 添加 `Command failed due to unhandled error: reference ' refs/remotes/origin/master',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63077718/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com