How to Solve VS Code Install Go Plug-in Error

Environmental description


Go 1.17.3

VS Code 1.62.2

Problem phenomenon

When developing the Go program with vscode, you will be prompted that the go plug-in is not installed, and click Install all

A bunch of installation failures will be reported


Error: Command failed: D:\Go\bin\go.exe get -u -v (download)


https fetch failed: Get dial tcp connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.


use agent

Set the go environment variable in the CMD window

go env -w GO111MODULE=on
go env -w GOPROXY=,direct

Close, reopen vscode, and click Install all to complete the installation

Similar Posts: