1. [ERROR] Update failed for golang.org/x/crypto: Cannot detect VCS
  2. [ERROR] Failed to install: Cannot detect VCS

通过glide mirror设置

最初参考https://zhuanlan.zhihu.com/p/27994151这篇文章 只设置了一个

glide mirror set golang.org/x/crypto github.com/golang/crypto
发现不成功.

设置了下面一堆 然后运行glide install 成功啦。。

  1. glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
  2. glide mirror set https://google.golang.org/grpc https://github.com/grpc/grpc-go --vcs git
  3. glide mirror set https://google.golang.org/genproto https://github.com/google/go-genproto --vcs git
  4. glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
  5. glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
  6. glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
  7. glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
  8. glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
  9. glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
  10. glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git

还是失败的话,设置一下git:

  1. git config --global http.sslVerify true

https://github.com/golang下的工程用git clone拷贝到/Users/shaohua/SourceCode/gopath/src/golang.org目录里。其中/Users/shaohua/SourceCode/gopath为我的$GOPATH目录。最后的结构为:

  1. /Users/shaohua/SourceCode/gopath/src/golang.org/x
  2. $ x ls
  3. crypto sys text tour

其他的解决办法:
resolved.
set correct mirrors for golang.org/x/…
add golang.org/x/… to glide.yaml manually (or by glide get)

其他解决办法2:

  1. mkdir -p $GOPATH/src/golang.org/x/
  2. cd $GOPATH/src/golang.org/x/
  3. git clone https://github.com/golang/net.git net
  4. go install net