问题
使用 glide install
或 glide up
时报 Cannot detect VCS
image.png
解决
这个是国内访问golang.org
被墙导致的
解决方法如下:
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto
理论上这样后再执行 glide install
或 glide up
就可以了
- 如果按上面方式还不行的话,尝试如下方法:
rm -rf ~/.glide
mkdir -p ~/.glide
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto
- 有可能你的是下面的链接,用到哪个执行哪个就好
glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git
glide mirror set https://golang.org/x/sys https://github.com/golang/sys --vcs git