-
Notifications
You must be signed in to change notification settings - Fork 51
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
proxy env settings not respected in download.js #5
Comments
I also have the problem to download behind proxy |
Same problem, please fix... |
I'm working on this. |
Have you committed your solution to vscode master? |
Is this fixed yet? (I'm running into it) |
Who can merge Emmanuels solution to this issue? |
Please, we want someone who can make this happen faster. |
Any updates on when you can merge this fix in? |
Fixing Issue #5 : proxy settings not used
This issue is back again in v1.11.2 if you are using credentials in HTTP_PROXY/HTTPS_PROXY on windows. It seems the "user:password" credentials are ignored in the proxy URL for Invoke-Webrequest command when using the "-Proxy" parameter. This means that we still fail with to download since we are not being authenticated. |
Interesting, do you have any idea how this worked before the linked commit when we did not pass any proxy? |
I believe Invoke-Webrequest uses the system proxy configuration if no -Proxy is provided. In my case this worked(works) fine. I also believe that using the -Proxy like this works fine like this as long as you don't require authentication for your proxy. In my use-case I need to specify HTTP_PROXY/HTTPS_PROXY env vars with authentication for other parts of Yarn/NPM. So ideally, I think we should try detect if the *_PROXY vars contain authentication, then create a proper user credentials object to supply Invoke-Webrequest with. This seems to be the only way to specify authenticated proxies to Invoke-Webrequest. |
The download.js script does not care about proxy env variables being set. Therefore it fails to download if the system is behind a proxy.
`yarn add vscode-ripgrep
yarn add v1.19.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info There appears to be trouble with your network connection. Retrying...
error C:\docker\theia-java\node_modules\vscode-ripgrep: Command failed.
Exit code: 1
Command: node ./lib/postinstall.js
Arguments:
Directory: C:\docker\theia-java\node_modules\vscode-ripgrep
Output:
Finding release for v11.0.1-2
GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v11.0.1-2
events.js:167
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 140.82.118.5:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
Emitted 'error' event at:
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.`
The solution would be to add host and port in https.get opts object, and to use -Proxy option for windows.
The text was updated successfully, but these errors were encountered: