Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Can we get this to work through a proxy? #19

Closed
ozippy opened this issue Jun 8, 2016 · 7 comments
Closed

Can we get this to work through a proxy? #19

ozippy opened this issue Jun 8, 2016 · 7 comments

Comments

@ozippy
Copy link

ozippy commented Jun 8, 2016

This looks really good. I have VSCode working through our proxy and have been able to install the extension. When I open a repo from VSTS, I think it connects using my token, but then it shows an ECONNREFUSED error when I hover over the Team icon in the status bar.

Thanks

vstseconnrefused

@jeffyoung
Copy link
Contributor

Hi ozippy.

Unfortunately, it appears that the vso-node-api package that the VS Code extension uses still needs true proxy support. See microsoft/azure-devops-node-api#35. Although there is an active PR out for adding the support, so hopefully that will come soon.

@jeffyoung
Copy link
Contributor

Hi @ozippy. So the change for this went in a while back (Oct 2016). You'd need to set the HTTP_PROXY or HTTPS_PROXY variable to your proxy server and include the port. I'd be very interested in knowing if this works out for you.

@ghost
Copy link

ghost commented May 10, 2017

Hi @jeffyoung . I'm behind a corporate proxy that requires auth. Can't make vscode connect through it no matter the value of the HTTP(S)_PROXY env vars or the http.proxy setting in vscode itself. Even if I set a name & pass in the proxy value. Is this still an outstanding item? I have a colleague who's really keen to be using vscode for all his front-end dev, but half our projects are TFVC and half Git.

@ghost
Copy link

ghost commented May 10, 2017

Debug logging in case it's useful:

2017-05-10T14:27:31.477Z - debug: [09604] Reinitializing due to onDidChangeConfiguration
2017-05-10T14:27:31.478Z - debug: [09604] Polling interval value (minutes): 5
2017-05-10T14:27:31.479Z - debug: [09604] Looking for an External Context at c:\Dev\VSTS\XX
2017-05-10T14:27:31.479Z - debug: [09604] No External Context at c:\Dev\VSTS\XX
2017-05-10T14:27:31.481Z - debug: [09604] Looking for TFVC repository at c:\Dev\VSTS\XX
2017-05-10T14:27:31.481Z - debug: [09604] TFVC Creating Tfvc object with localPath='undefined'
2017-05-10T14:27:31.481Z - debug: [09604] Using TFS proxy: undefined
2017-05-10T14:27:31.481Z - debug: [09604] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-05-10T14:27:31.482Z - debug: [09604] TFVC Repository created with repositoryRootFolder='c:\Dev\VSTS\XX'
2017-05-10T14:27:31.483Z - debug: [09604] TFVC Repository.CheckVersion
2017-05-10T14:27:31.483Z - debug: [09604] TFVC: tf add -noprompt -?
2017-05-10T14:27:31.494Z - debug: [09604] TFVC: spawned new process (duration: 10ms)
2017-05-10T14:27:31.582Z - debug: [09604] TFVC: add exit code: 0 (duration: 99ms)
2017-05-10T14:27:31.582Z - debug: [09604] TFVC Repository.FindWorkspace with localPath='c:\Dev\VSTS\XX'
2017-05-10T14:27:31.583Z - debug: [09604] TFVC: tf workfold -noprompt ********
2017-05-10T14:27:31.594Z - debug: [09604] TFVC: spawned new process (duration: 11ms)
2017-05-10T14:27:32.275Z - debug: [09604] TFVC: workfold exit code: 0 (duration: 692ms)
2017-05-10T14:27:32.276Z - debug: [09604] Found a TFVC repository for url: 'https://mycompany-teamservices.visualstudio.com/' and team project: 'TAT'.
2017-05-10T14:27:32.276Z - debug: [09604] _isTeamServicesUrl: true
2017-05-10T14:27:32.276Z - debug: [09604] Parsing values from repositoryInfo as string url
2017-05-10T14:27:32.276Z - debug: [09604] TFVC Creating Tfvc object with localPath='undefined'
2017-05-10T14:27:32.277Z - debug: [09604] Using TFS proxy: undefined
2017-05-10T14:27:32.277Z - debug: [09604] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-05-10T14:27:32.278Z - debug: [09604] TFVC Repository created with repositoryRootFolder='c:\Dev\VSTS\XX'
2017-05-10T14:27:32.358Z - debug: [09604] Started ApplicationInsights telemetry
2017-05-10T14:27:32.358Z - info: [09604] Getting repository information with repositoryInfoClient
2017-05-10T14:27:32.358Z - debug: [09604] RemoteUrl = https://mycompany-teamservices.visualstudio.com/
2017-05-10T14:27:32.358Z - debug: [09604] Getting repository information for a TFVC repository at https://mycompany-teamservices.visualstudio.com/
2017-05-10T14:27:32.359Z - debug: [09604] _isTeamServicesUrl: true
2017-05-10T14:27:32.359Z - debug: [09604] Parsing values from repositoryInfo as string url
2017-05-10T14:27:32.598Z - error: [09604] Failed call with repositoryClient: It appears the configured proxy is not reachable. Please check your connection and try again. Error: Error: tunneling socket could not be established, statusCode=407
2017-05-10T14:27:32.598Z - debug: [09604] Error: tunneling socket could not be established, statusCode=407
2017-05-10T14:27:32.601Z - info: [09604] Sent TFVC tooling telemetry
2017-05-10T14:27:32.601Z - debug: [09604] Re-initializing the TfvcSCMProvider
2017-05-10T14:27:32.603Z - debug: [09604] TFVC Repository.CheckVersion
2017-05-10T14:27:32.604Z - debug: [09604] TFVC: tf add -noprompt -?
2017-05-10T14:27:32.622Z - debug: [09604] TFVC: spawned new process (duration: 17ms)
2017-05-10T14:27:32.744Z - debug: [09604] TFVC: add exit code: 0 (duration: 140ms)
2017-05-10T14:27:32.746Z - debug: [09604] TFVC Repository.GetStatus
2017-05-10T14:27:32.747Z - debug: [09604] TFVC: tf status -noprompt -format:detailed -recursive
2017-05-10T14:27:32.758Z - debug: [09604] TFVC: spawned new process (duration: 11ms)
2017-05-10T14:27:32.758Z - debug: [09604] Re-initialized the TfvcSCMProvider
2017-05-10T14:27:34.287Z - debug: [09604] TFVC: status exit code: 0 (duration: 1540ms)

@jeffyoung
Copy link
Contributor

Hi @RobPurcellCgl, thanks for trying out the extension.

It looks like this (authenticated proxies) is still an issue in the vso-node-api library (which is used by the VS Code extension). The extension currently uses version ^5.1.1 but it appears there's been a major update to it (pushing it past v6) that made some bigger changes. Looking in the code there, it appears it's still a TODO.

@jeffyoung
Copy link
Contributor

At this point, an unauthenticated proxy should work (by setting http_proxy and https_proxy env vars; http_proxy in VS Code settings will not do). Authenticated proxies are still not supported by the vsts-node-api dependency.

@ghost
Copy link

ghost commented Jun 12, 2017

OK, thanks Jeff. We've made a couple of simple TF CLI scripts for him to check in/out for now. Bit of a faff though. We'll wait on this getting sorted.
Cheers

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

2 participants