码迷,mamicode.com
首页 > 其他好文 > 详细

Golang1.13.x 解决go get 无法下载问题

时间:2020-02-11 11:22:14      阅读:452      评论:0      收藏:0      [点我收藏+]

标签:sam   镜像   exit   解决   test   七牛云   list   aging   car   

安装golang github.com/hyperledger/fabric-contract-api-go依赖包的时候,长时间无响应,最后报如下错误:

go: github.com/hyperledger/fabric-contract-api-go@v1.0.0: Get https://proxy.golang.org/github.com/hyperledger/fabric-contract-api-go/@v/v1.0.0.mod: dial tcp 172.217.27.145:443: i/o timeout
~/fabric-samples/test-network
Finished vendoring Go dependencies
++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1
++ res=1
++ set +x
Error: failed to normalize chaincode path: ‘go list‘ failed with: go: github.com/hyperledger/fabric-contract-api-go@v1.0.0: Get https://proxy.golang.org/github.com/hyperledger/fabric-contract-api-go/@v/v1.0.0.mod: dial tcp 172.217.27.145:443: i/o timeout: exit status 1
!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!

ERROR !!! Deploying chaincode failed

解决办法

使用七牛云 go module 镜像

golang1.13.x 可以直接执行:

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

然后再次使用 go get 下载 gin 依赖就可以了。

Golang1.13.x 解决go get 无法下载问题

标签:sam   镜像   exit   解决   test   七牛云   list   aging   car   

原文地址:https://www.cnblogs.com/zhangmingcheng/p/12294156.html

(0)
(2)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!