当前位置:   article > 正文

go环境下载github文件显示timeout解决方法_go 下载 github i/o timeout

go 下载 github i/o timeout

1、问题背景

go环境正常,需要去github拉取一个资源进行编译

go build -v -o naabu cmd/naabu/main.go

编译过程中报错如下:
pkg/runner/runner.go:19:2: github.com/miekg/dns@v1.1.53: Get "https://proxy.golang.org/github.com/miekg/dns/@v/v1.1.53.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/nmap.go:10:2: github.com/pkg/errors@v0.9.1: Get "https://proxy.golang.org/github.com/pkg/errors/@v/v0.9.1.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/runner.go:21:2: github.com/projectdiscovery/blackrock@v0.0.1: Get "https://proxy.golang.org/github.com/projectdiscovery/blackrock/@v/v0.0.1.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/runner.go:22:2: github.com/projectdiscovery/clistats@v0.0.15: Get "https://proxy.golang.org/github.com/projectdiscovery/clistats/@v/v0.0.15.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/runner.go:23:2: github.com/projectdiscovery/dnsx@v1.1.4: Get "https://proxy.golang.org/github.com/projectdiscovery/dnsx/@v/v1.1.4.zip": dial tcp 142.251.43.17:443: i/o timeout
cmd/naabu/main.go:4:2: github.com/projectdiscovery/fdmax@v0.0.4: Get "https://proxy.golang.org/github.com/projectdiscovery/fdmax/@v/v0.0.4.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/healthcheck.go:9:2: github.com/projectdiscovery/goflags@v0.1.8: Get "https://proxy.golang.org/github.com/projectdiscovery/goflags/@v/v0.1.8.zip": dial tcp 142.251.43.17:443: i/o timeout
cmd/naabu/main.go:5:2: github.com/projectdiscovery/gologger@v1.1.8: Get "https://proxy.golang.org/github.com/projectdiscovery/gologger/@v/v1.1.8.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/validate.go:17:2: github.com/projectdiscovery/gologger@v1.1.8: Get "https://proxy.golang.org/github.com/projectdiscovery/gologger/@v/v1.1.8.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/validate.go:18:2: github.com/projectdiscovery/gologger@v1.1.8: Get "https://proxy.golang.org/github.com/projectdiscovery/gologger/@v/v1.1.8.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/runner.go:25:2: github.com/projectdiscovery/mapcidr@v1.1.1: Get "https://proxy.golang.org/github.com/projectdiscovery/mapcidr/@v/v1.1.1.zip": dial tcp 142.251.43.17:443: i/o timeout
pkg/runner/targets.go:13:2: github.com/projectdiscovery/mapcidr@v1.1.1: Get "https://proxy.golang.org/github.com/projectdiscovery/mapcidr/@v/v1.1.1.zip": dial tcp 142.251.43.17:443: i/o timeout
 

 

2、解决方案

配置代理,命令如下:

 go env -w GOPROXY=https://goproxy.cn

然后再继续使用go命令去编译即可。

 go build -v -o naabu cmd/naabu/main.go

编译成功。

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/401671
推荐阅读
相关标签
  

闽ICP备14008679号