【问题标题】:dep ensure fails with Solving failure: failed to clean up git repository .dep 确保因解决失败而失败:未能清理 git 存储库。
【发布时间】:2018-03-25 13:22:45
【问题描述】:

我正在尝试导入 go repo https://github.com/cloudfoundry/cli

当我在 go 程序中添加 import 语句时,我的 dep initdep ensure 命令失败。

我不确定我无法获得回购的原因是什么。我可以在 go/src 中执行 git clone 并抱怨本地版本可能不一致。

不确定这个特定的 repo 发生了什么。

bash-3.2$ dep ensure
Solving failure: failed to clean up git repository at /Users/rjain/go/pkg/dep/sources/https---github.com-cloudfoundry-cli - dirty? corrupted? status output: 
 D VERSION

【问题讨论】:

    标签: go dep


    【解决方案1】:

    这是因为这个repo有大量的子模块,其中一些是私有repos,有些已经不存在了。尝试运行dep ensure -v,您会看到错误。似乎 dep 试图检查每个子模块。

    如果我是你,我会确定我需要的子模块并直接导入。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-28
      • 2010-12-28
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 1970-01-01
      • 2021-11-04
      • 1970-01-01
      相关资源
      最近更新 更多