golang dep 导入报错问题

清疚 2022-05-12 13:56 327阅读 0赞

在goland开发工具启动经常会报http://golang.org/x/text?go-get=1等golang.org域名不可访问问题。

Error代码

  1. The following issues were found in Gopkg.toml:
  2. ✗ unable to deduce repository and source type for “golang.org/x/crypto”: unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL “h
    ttp://golang.org/x/crypto?go-get=1”: Get http://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:80: connectex: A connection attempt failed because the conne
    cted party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
  3. ProjectRoot name validation failed

    查看代理查看命令

    netstat -ano 查看所有连接的PID及端口号

    C:>netstat -ano

查看代理ip及端口号,例如 shadowsocks 127.0.0.1:10800

常用的查看命令

netstat -ano 查看所有连接的PID及端口号

C:\>netstat -ano

如果知道ip及端口号

window命令行执行以下命令

set http_proxy=http://127.0.0.1:10800

set https_proxy=http://127.0.0.1:10800

发表评论

表情:
评论列表 (有 0 条评论,327人围观)

还没有评论,来说两句吧...

相关阅读