glide 解決 golang.org/x/net 等依賴包無法獲取


知道glide有設置鏡像功能,可以把某個依賴包的源地址切換為另一個地址,相當於切換到鏡像地址,用於某些依賴包被牆的原因

之前碰到 golang.org/x/net,設置鏡像:

glide mirror set golang.org/x/crypto github.com/golang/crypto

發現沒有效果,還是會報error

[WARN]    Unable to checkout golang.org/x/crypto
[ERROR]    Update failed for golang.org/x/crypto: Cannot detect VCS
[ERROR]    Failed to do initial checkout of config: Cannot detect VCS

於是換成下面的 mirror 方式:

$ 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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM