-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题:vscode 远程开发,goproxy 怎么配置? #179
Comments
远程开发自然是要将环境变量配置到远程机器上了。你是怎么远程开发的?用的 Visual Studio Code Server 吗? |
是的,但是gopls 依然是 i/o timeout |
是的,该配置的都配置了,但是 go 扩展安装 gopls 等tools 时候依然是 i/o time out |
go env -w GOPROXY=https://goproxy.cn,direct 下可以吗 |
代理在远程机器上正常配置就可以, 和vscode远程开发没有关系 |
远程上去后,先go env看看当前的环境情况。 |
@digbangbang 看起来安装的时候没用使用到goproxy.cn,而是用了goproxy.io。可能是vscode远程的环境问题,需要再研究一下。 |
@digbangbang vscode的用户和go env是同一个用户? |
您可以和我说一下具体在vscode + wsl上安装go和插件的步骤吗,以及怎么配置,我好像在网上找不到具体的资料,导致错误很多,真的不好意思! |
如果是在vscode里安装插件工具包,得在将配置写入.profile文件后将主机重启,以重载vscode的配置。重启后vscode就可以正常使用goproxy下载插件工具包。 |
已经在 ~/.bashrc 中配置了环境变量 export GOPROXY=https://goproxy.cn,direct
Tools environment: GOPATH=undefined
Installing 1 tool at undefined in module mode.
go-outline
Installing golang.org/x/tools/gopls@latest FAILED
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "/home/ldy/go/bin/go install -v golang.org/x/tools/gopls@latest",
"stdout": "",
"stderr": "go: golang.org/x/tools/gopls@latest: module golang.org/x/tools/gopls: Get "https://proxy.golang.org/golang.org/x/tools/gopls/@v/list\": dial tcp 172.217.163.49:443: i/o timeout\n"
}
1 tools failed to install.
gopls: failed to install gopls(golang.org/x/tools/gopls@latest): Error: Command failed: /home/ldy/go/bin/go install -v golang.org/x/tools/gopls@latest
go: golang.org/x/tools/gopls@latest: module golang.org/x/tools/gopls: Get "https://proxy.golang.org/golang.org/x/tools/gopls/@v/list": dial tcp 172.217.163.49:443: i/o timeout
Installing github.com/ramya-rao-a/[email protected] FAILED
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "/home/ldy/go/bin/go install -v github.com/ramya-rao-a/[email protected]",
"stdout": "",
"stderr": "go: github.com/ramya-rao-a/[email protected]: github.com/ramya-rao-a/[email protected]: Get "https://proxy.golang.org/github.com/ramya-rao-a/go-outline/@v/v0.0.0-20210608161538-9736a4bde949.info\": dial tcp 172.217.163.49:443: i/o timeout\n"
}
1 tools failed to install.
go-outline: failed to install go-outline(github.com/ramya-rao-a/[email protected]): Error: Command failed: /home/ldy/go/bin/go install -v github.com/ramya-rao-a/[email protected]
go: github.com/ramya-rao-a/[email protected]: github.com/ramya-rao-a/[email protected]: Get "https://proxy.golang.org/github.com/ramya-rao-a/go-outline/@v/v0.0.0-20210608161538-9736a4bde949.info": dial tcp 172.217.163.49:443: i/o timeout
当你执行
go version
命令后的输出结果是什么?当你执行
go env
命令后的输出结果是什么?go env
的输出结果你做了什么?
你期望看到的结果是什么?
你实际看到的结果是什么?
The text was updated successfully, but these errors were encountered: