dep ensure报错unable to update checked out version: fatal: reference is not a tree:

dep ensure报如下错误:

(1) ✗ unable to update checked out version: fatal: reference is not a tree: 2b758aa73013d2b1f11077aeca87ea042a1438bf
(1) : command failed: [git checkout 2b758aa73013d2b1f11077aeca87ea042a1438bf]: exit status 128
(1) ← no more versions of github.com/bradfitz/slice to try; begin backtrack

但是查看过 github.com/bradfitz/slice ,2b758aa73013d2b1f11077aeca87ea042a1438bf命名是master上的最新一条commit。几经尝试和搜索,找到了如下可行的解决方法:

删除 $GOPATH/pkg/dep/sources

参考:https://github.com/golang/dep/issues/699

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容