Skip to content

Add -insecure to go get command when getting additional tools #814

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

Closed
brownwk opened this issue Oct 20, 2020 · 2 comments
Closed

Add -insecure to go get command when getting additional tools #814

brownwk opened this issue Oct 20, 2020 · 2 comments

Comments

@brownwk
Copy link

brownwk commented Oct 20, 2020

If you have a question, please ask it on the #vscode or #vscode-go channels in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode).

Is your feature request related to a problem? Please describe.
When the extension want to install things like gopls, it can't as some places use certifcate chains. This is solved by using -insecure in the go get command.
Describe the solution you'd like
I think the issue is in the goGetPackage.ts file. Line 35, I think you need to add '-insecure' after the '-v'. Although this would be better if it was configurable. I don't think everyone would want the default being insecure
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I typicall copy and paste the command it is trying to run in code's terminal and add the -insecure option.
Additional context
Add any other context or screenshots about the feature request here.

@hyangah
Copy link
Contributor

hyangah commented Oct 22, 2020

@brownwk thanks for the feature request.

The flag -insecure is going to be deprecated (golang/go#37519) and GOINSECURE environment variable is recommended instead. (See
https://golang.org/cmd/go/#hdr-Environment_variables).

You can set GOINSECURE in "go.toolsEnvVar". You will need this anyway to make other tools such as gopls or go in modules mode to work smoothly.

I filed #825 to allow fine tune the tool installation process, but it's likely that you don't need that.

@hyangah
Copy link
Contributor

hyangah commented Feb 16, 2021

Closing in favor of #825.

@hyangah hyangah closed this as completed Feb 16, 2021
@golang golang locked and limited conversation to collaborators Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants