简体   繁体   中英

dep ensure fails with Solving failure: failed to clean up git repository .

I am trying to import the go repo https://github.com/cloudfoundry/cli

My dep init or dep ensure commands fail when I add the import statement in my go program.

I am not sure what is the reason I am not able to get the repo. I can do a git clone in the go/src and it complains that the local version might be inconsistent.

Not sure what is happening with this particular 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

It's because this repo has a massive number of submodules, and some of them are private repos, and some of them no longer exists. Try running dep ensure -v and you'll see the errors. It seems that dep tries to check out every submodule.

If I was you, I would identify the submodule I need and import that directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM