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

401 Unathorized when trying to connect to on-premises TFS2015 Update 2 (SSL) #59

Closed
Kollibri opened this issue Nov 2, 2016 · 29 comments · Fixed by #253
Closed

401 Unathorized when trying to connect to on-premises TFS2015 Update 2 (SSL) #59

Kollibri opened this issue Nov 2, 2016 · 29 comments · Fixed by #253

Comments

@Kollibri
Copy link

Kollibri commented Nov 2, 2016

I have been unable to login using this extension to an on-premises TFS2015 (Update 2) server. Below are the logs:

2016-11-02T19:09:03.664Z - info: [11044] Login: Username and Password provided as authentication.
2016-11-02T19:09:03.838Z - debug: [11044] Parsing values from repositoryInfo as string url
2016-11-02T19:09:03.838Z - debug: [11044] Polling interval value (minutes): 5
2016-11-02T19:09:03.838Z - info: [11044] *** FOLDER: c:\Users\username\Source\Repos\GIT Test ***
2016-11-02T19:09:03.838Z - debug: [11044] No account-specific pinned query or global pinned query found. Using default.
2016-11-02T19:09:03.838Z - debug: [11044] No account-specific token or global token found.
2016-11-02T19:09:03.893Z - debug: [11044] Started ApplicationInsights telemetry
2016-11-02T19:09:03.893Z - info: [11044] Getting repository information (vsts/info) with repositoryClient
2016-11-02T19:09:03.893Z - debug: [11044] RemoteUrl = https://test-tfs.something.com/tfs/Test/_git/GIT%20test
2016-11-02T19:09:03.920Z - error: [11044] Failed (vsts/info) call with repositoryClient: Unauthorized. Check your authentication credentials and try again.
2016-11-02T19:09:03.920Z - debug: [11044] Failed Request: Unauthorized(401) - https://test-tfs.something.com/tfs/Test/_git/GIT%20test/vsts/info

I have setup a TFS server on my local machine (doesn't use SSL) and I am able to login to that without issue.
I am able to clone the origin/remote repository without issue (which uses my credentials), but this extension will not login to the remote TFS server. I am using NTLM authentication.

I am using VSCode 1.6.1 and version 1.108.0 of this extension.

Any ideas?

@jeffyoung
Copy link
Contributor

Hi Amanda. Thanks for trying out the extension!

Unfortunately, as you (and some other folks) have found out, there are some issues with being able to connect to Team Foundation servers. The extension connects to Team Services and Team Foundation servers using the vsts-node-api package (which is a different mechanism than what git.exe uses). An issue was reported around load balancers (#55) and you've run into an issue with SSL (there's another at #54). I added the NTLM support relatively recently to the vsts-node-api so we had some basic support for TFS.

After doing some debugging, I do see some failures when accessing Team Foundation servers over SSL. Presumably changes to the NTLM handler will need to be made but I don't know what exactly (thinking out loud... perhaps the extension could make use of the CoreCLR in the future as it has much better support for NTLM authentication). Anyway, it's going to require more investigation and digging but I don't have an ETA on when that will occur. That said, I'll certainly add it to our backlog.

As you've noticed, connecting over HTTP does work but I'd guess that isn't a workaround for you. I wish I had a better answer at this point.

Thanks again for letting us know.

@jmezach
Copy link

jmezach commented Feb 6, 2017

I've also hit this issue as I'm trying to move our TFS server to HTTPS (which is now the suggested configuration). Any updates on this issue? I've set the logging to verbose and I found this:

2017-02-06T12:04:19.055Z - info:   [92354] *** FOLDER: /Users/jmezach/Projects/De Vries/RR ***
2017-02-06T12:04:19.057Z - debug:  [92354] Found pinned queries in user configuration settings.
2017-02-06T12:04:19.062Z - debug:  [92354] No account-specific token or global token found.
2017-02-06T12:04:19.225Z - debug:  [92354] Started ApplicationInsights telemetry
2017-02-06T12:04:19.226Z - info:   [92354] Getting repository information (vsts/info) with repositoryClient
2017-02-06T12:04:19.226Z - debug:  [92354] RemoteUrl = https://tfs.zeus.corp/tfs/DefaultCollection/De%20Vries%20WFM/_git/RR
2017-02-06T12:04:19.324Z - error:  [92354] Failed (vsts/info) call with repositoryClient:  Unauthorized. Check your authentication credentials and try again.
2017-02-06T12:04:19.324Z - debug:  [92354] Failed Request: Unauthorized(401) - https://tfs.zeus.corp/tfs/DefaultCollection/De%20Vries%20WFM/_git/RR/vsts/info
2017-02-06T12:04:29.410Z - info:   [92354] Login: Username and Password provided as authentication.
2017-02-06T12:04:29.636Z - debug:  [92354] Parsing values from repositoryInfo as string url
2017-02-06T12:04:29.636Z - debug:  [92354] Polling interval value (minutes): 5
2017-02-06T12:04:29.637Z - info:   [92354] *** FOLDER: /Users/jmezach/Projects/De Vries/RR ***
2017-02-06T12:04:29.637Z - debug:  [92354] Found pinned queries in user configuration settings.
2017-02-06T12:04:29.639Z - debug:  [92354] No account-specific token or global token found.
2017-02-06T12:04:29.715Z - debug:  [92354] Started ApplicationInsights telemetry
2017-02-06T12:04:29.715Z - info:   [92354] Getting repository information (vsts/info) with repositoryClient
2017-02-06T12:04:29.715Z - debug:  [92354] RemoteUrl = https://tfs.zeus.corp/tfs/DefaultCollection/De%20Vries%20WFM/_git/RR
2017-02-06T12:04:29.754Z - error:  [92354] Failed (vsts/info) call with repositoryClient:  Unauthorized. Check your authentication credentials and try again.
2017-02-06T12:04:29.754Z - debug:  [92354] Failed Request: Unauthorized(401) - https://tfs.zeus.corp/tfs/DefaultCollection/De%20Vries%20WFM/_git/RR/vsts/info

@xxGizmoCodexx
Copy link

Hi everyone would like to report the same issue.

`2017-05-04T08:03:19.119Z - info: [06224] *** FOLDER: c:\Source\IoT.nxt_Git\IoT.nxt.Workflow\Designer ***
2017-05-04T08:03:19.120Z - info: [06224] version 1.117.1
2017-05-04T08:03:19.163Z - info: [06224] Getting repository information with repositoryInfoClient
2017-05-04T08:03:21.195Z - error: [06224] Failed call with repositoryClient: Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - https://tfs.dev.10t.co.za:8081/tfs/IoT/IoT.nxt/_git/IoT.nxt.Workflow/vsts/info
2017-05-04T08:04:08.996Z - info: [06224] Signin: Username and Password provided as authentication.
2017-05-04T08:04:09.067Z - info: [06224] *** FOLDER: c:\Source\IoT.nxt_Git\IoT.nxt.Workflow\Designer ***
2017-05-04T08:04:09.067Z - info: [06224] version 1.117.1
2017-05-04T08:04:09.099Z - info: [06224] Getting repository information with repositoryInfoClient
2017-05-04T08:04:11.097Z - error: [06224] Failed call with repositoryClient: Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - https://tfs.dev.10t.co.za:8081/tfs/IoT/IoT.nxt/_git/IoT.nxt.Workflow/vsts/info

Any updates would be appreciated. I like using VSCode environment and using this extension effectively would make life even greater P

@jeffyoung
Copy link
Contributor

Hi @xxGizmoCodexx. It's an issue that I need to investigate and plan on doing it soon. Are you using TFS 2015 (like this thread is about) or 2017 (like #65)? Thanks!

@xxGizmoCodexx
Copy link

Thanks, @jeffyoung. Good to hear that this matter is being looked into.

We are indeed using TFS 2015

@Yaash19
Copy link

Yaash19 commented May 23, 2017

Hi @jeffyoung , is this still in your radar to fix ?do you have approx ETA on it ?

@jeffyoung
Copy link
Contributor

Absolutely. Unfortunately, no, I don't have an ETA. I believe I'll have to investigate the issue in the vsts-node-api package (as the extension depends on that). I sense that the 'fix' isn't going to be a simple "one-liner" but I do expect to start investigating soon (and, yeah, I wish I could be more specific).

@xxGizmoCodexx
Copy link

xxGizmoCodexx commented May 29, 2017

I have, in the meantime, reverted to using the method of including '#TFSTaskNumber' in my git commits to link certain code changes to TFS work tasks eg git commit -m 'Fix some things concerning #247'

@mrichman
Copy link

I have this issue as well. Multiple attempts to do Team: Signin end up locking my account.

2017-05-31T14:17:19.480Z - debug:  [14088] 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-31T14:17:19.480Z - debug:  [14088] TFVC Repository created with repositoryRootFolder='c:\tfs\EcoSys\SCM\Azure'
2017-05-31T14:17:19.590Z - debug:  [14088] Started ApplicationInsights telemetry
2017-05-31T14:17:19.591Z - info:   [14088] Getting repository information with repositoryInfoClient
2017-05-31T14:17:19.591Z - debug:  [14088] RemoteUrl = http://tfs:8080/tfs/ecosys
2017-05-31T14:17:19.600Z - debug:  [14088] Getting repository information for a TFVC repository at http://tfs:8080/tfs/ecosys
2017-05-31T14:17:19.601Z - debug:  [14088] Parsing values from repositoryInfo as string url
2017-05-31T14:17:19.602Z - debug:  [14088] Starting the validation of the collection. Url: 'http://tfs:8080/tfs/ecosys'
2017-05-31T14:17:19.856Z - error:  [14088] Failed call with repositoryClient:  Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches
2017-05-31T14:17:19.856Z - debug:  [14088] Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches

@markusmauch
Copy link

Same thing here:
2017-06-08T07:35:11.631Z - debug: [06460] Error: Failed Request: Unauthorized(401) - https://tfs.trumpf.de/true_control/_apis/tfvc/branches

@jeffyoung
Copy link
Contributor

I just released version 1.119.0 that should (help to) resolve this issue. I'd be very interested if folks try it out and let me know!

@mrichman
Copy link

Same issue for me.

2017-06-15T16:58:15.399Z - info:   [17876] *** FOLDER: c:\tfs\EcoSys\SCM\Azure ***
2017-06-15T16:58:15.403Z - info:   [17876] VSTSVSCode/1.119.0 (VSCode 1.13.0; Windows_NT 10.0.14393; Node 7.4.0)
2017-06-15T16:58:15.406Z - debug:  [17876] Looking for an External Context at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:58:15.406Z - debug:  [17876] No External Context at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:58:15.409Z - debug:  [17876] Looking for TFVC repository at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:58:15.410Z - debug:  [17876] TFVC Creating Tfvc object with localPath='undefined'
2017-06-15T16:58:15.411Z - debug:  [17876] Using TFS proxy: undefined
2017-06-15T16:58:15.411Z - debug:  [17876] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-06-15T16:58:15.412Z - debug:  [17876] TFVC Repository created with repositoryRootFolder='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:58:15.414Z - debug:  [17876] TFVC Repository.CheckVersion
2017-06-15T16:58:15.416Z - debug:  [17876] TFVC: tf add -noprompt -?
2017-06-15T16:58:15.435Z - debug:  [17876] TFVC: spawned new process (duration: 18ms)
2017-06-15T16:58:15.462Z - debug:  [17876] TFVC: spawned new process (duration: 26ms)
2017-06-15T16:58:16.469Z - debug:  [17876] TFVC: add exit code: 0 (duration: 1052ms)
2017-06-15T16:58:16.471Z - debug:  [17876] TFVC Minimum required version: 14.102.0
2017-06-15T16:58:16.471Z - debug:  [17876] TFVC (TF.exe, TF.cmd) version: 15.112.26421.0
2017-06-15T16:58:16.472Z - debug:  [17876] TFVC Repository.FindWorkspace with localPath='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:58:16.473Z - debug:  [17876] TFVC: tf workfold -noprompt c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:58:16.497Z - debug:  [17876] TFVC: spawned new process (duration: 23ms)
2017-06-15T16:58:16.657Z - debug:  [17876] TFVC: workfold exit code: 0 (duration: 184ms)
2017-06-15T16:58:16.660Z - debug:  [17876] Found a TFVC repository for url: 'http://tfs:8080/tfs/ecosys' and team project: 'SCM'.
2017-06-15T16:58:16.664Z - debug:  [17876] Parsing values from repositoryInfo as string url
2017-06-15T16:58:16.665Z - debug:  [17876] TFVC Creating Tfvc object with localPath='undefined'
2017-06-15T16:58:16.665Z - debug:  [17876] Using TFS proxy: undefined
2017-06-15T16:58:16.665Z - debug:  [17876] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-06-15T16:58:16.666Z - debug:  [17876] TFVC Repository created with repositoryRootFolder='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:58:16.787Z - debug:  [17876] Started ApplicationInsights telemetry
2017-06-15T16:58:16.788Z - info:   [17876] Getting repository information with repositoryInfoClient
2017-06-15T16:58:16.788Z - debug:  [17876] RemoteUrl = http://tfs:8080/tfs/ecosys
2017-06-15T16:58:16.790Z - debug:  [17876] Getting repository information for a TFVC repository at http://tfs:8080/tfs/ecosys
2017-06-15T16:58:16.790Z - debug:  [17876] Parsing values from repositoryInfo as string url
2017-06-15T16:58:16.791Z - debug:  [17876] Starting the validation of the collection. Url: 'http://tfs:8080/tfs/ecosys'
2017-06-15T16:58:17.029Z - error:  [17876] Failed call with repositoryClient:  Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches
2017-06-15T16:58:17.030Z - debug:  [17876] Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches
2017-06-15T16:58:17.032Z - info:   [17876] Sent TFVC tooling telemetry
2017-06-15T16:58:17.032Z - debug:  [17876] Initializing the TfvcSCMProvider
2017-06-15T16:58:17.034Z - debug:  [17876] TFVC Repository.CheckVersion
2017-06-15T16:58:17.034Z - debug:  [17876] TFVC: tf add -noprompt -?
2017-06-15T16:58:17.052Z - debug:  [17876] TFVC: spawned new process (duration: 17ms)
2017-06-15T16:58:17.140Z - debug:  [17876] TFVC: add exit code: 0 (duration: 106ms)
2017-06-15T16:58:17.140Z - debug:  [17876] TFVC Minimum required version: 14.102.0
2017-06-15T16:58:17.140Z - debug:  [17876] TFVC (TF.exe, TF.cmd) version: 15.112.26421.0
2017-06-15T16:58:17.143Z - debug:  [17876] TFVC Repository.GetStatus
2017-06-15T16:58:17.143Z - debug:  [17876] TFVC: tf status -noprompt -format:detailed -recursive c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:58:17.172Z - debug:  [17876] TFVC: spawned new process (duration: 28ms)
2017-06-15T16:58:26.737Z - debug:  [17876] TFVC: status exit code: 0 (duration: 9593ms)
2017-06-15T16:58:26.742Z - debug:  [17876] Initialized the TfvcSCMProvider
2017-06-15T16:59:08.190Z - info:   [17876] Signin: Username and Password provided as authentication.
2017-06-15T16:59:08.408Z - debug:  [17876] Polling interval value (minutes): 5
2017-06-15T16:59:08.414Z - info:   [17876] *** FOLDER: c:\tfs\EcoSys\SCM\Azure ***
2017-06-15T16:59:08.414Z - info:   [17876] VSTSVSCode/1.119.0 (VSCode 1.13.0; Windows_NT 10.0.14393; Node 7.4.0)
2017-06-15T16:59:08.416Z - debug:  [17876] Looking for an External Context at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:59:08.416Z - debug:  [17876] No External Context at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:59:08.418Z - debug:  [17876] Looking for TFVC repository at c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:59:08.419Z - debug:  [17876] TFVC Creating Tfvc object with localPath='undefined'
2017-06-15T16:59:08.419Z - debug:  [17876] Using TFS proxy: undefined
2017-06-15T16:59:08.419Z - debug:  [17876] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-06-15T16:59:08.420Z - debug:  [17876] TFVC Repository created with repositoryRootFolder='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:59:08.421Z - debug:  [17876] TFVC Repository.CheckVersion
2017-06-15T16:59:08.422Z - debug:  [17876] TFVC: tf add -noprompt -?
2017-06-15T16:59:08.440Z - debug:  [17876] TFVC: spawned new process (duration: 16ms)
2017-06-15T16:59:08.514Z - debug:  [17876] TFVC: add exit code: 0 (duration: 91ms)
2017-06-15T16:59:08.517Z - debug:  [17876] TFVC Minimum required version: 14.102.0
2017-06-15T16:59:08.517Z - debug:  [17876] TFVC (TF.exe, TF.cmd) version: 15.112.26421.0
2017-06-15T16:59:08.518Z - debug:  [17876] TFVC Repository.FindWorkspace with localPath='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:59:08.518Z - debug:  [17876] TFVC: tf workfold -noprompt c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:59:08.542Z - debug:  [17876] TFVC: spawned new process (duration: 23ms)
2017-06-15T16:59:08.965Z - debug:  [17876] TFVC: workfold exit code: 0 (duration: 446ms)
2017-06-15T16:59:08.968Z - debug:  [17876] Found a TFVC repository for url: 'http://tfs:8080/tfs/ecosys' and team project: 'SCM'.
2017-06-15T16:59:08.969Z - debug:  [17876] Parsing values from repositoryInfo as string url
2017-06-15T16:59:08.970Z - debug:  [17876] TFVC Creating Tfvc object with localPath='undefined'
2017-06-15T16:59:08.970Z - debug:  [17876] Using TFS proxy: undefined
2017-06-15T16:59:08.971Z - debug:  [17876] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-06-15T16:59:08.971Z - debug:  [17876] TFVC Repository created with repositoryRootFolder='c:\tfs\EcoSys\SCM\Azure'
2017-06-15T16:59:09.045Z - debug:  [17876] Started ApplicationInsights telemetry
2017-06-15T16:59:09.045Z - info:   [17876] Getting repository information with repositoryInfoClient
2017-06-15T16:59:09.046Z - debug:  [17876] RemoteUrl = http://tfs:8080/tfs/ecosys
2017-06-15T16:59:09.048Z - debug:  [17876] Getting repository information for a TFVC repository at http://tfs:8080/tfs/ecosys
2017-06-15T16:59:09.048Z - debug:  [17876] Parsing values from repositoryInfo as string url
2017-06-15T16:59:09.048Z - debug:  [17876] Starting the validation of the collection. Url: 'http://tfs:8080/tfs/ecosys'
2017-06-15T16:59:09.255Z - error:  [17876] Failed call with repositoryClient:  Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches
2017-06-15T16:59:09.256Z - debug:  [17876] Error: Failed Request: Unauthorized(401) - http://tfs:8080/tfs/ecosys/_apis/tfvc/branches
2017-06-15T16:59:09.257Z - info:   [17876] Sent TFVC tooling telemetry
2017-06-15T16:59:09.257Z - debug:  [17876] Re-initializing the TfvcSCMProvider
2017-06-15T16:59:09.259Z - debug:  [17876] TFVC Repository.CheckVersion
2017-06-15T16:59:09.259Z - debug:  [17876] TFVC: tf add -noprompt -?
2017-06-15T16:59:09.274Z - debug:  [17876] TFVC: spawned new process (duration: 14ms)
2017-06-15T16:59:09.352Z - debug:  [17876] TFVC: add exit code: 0 (duration: 93ms)
2017-06-15T16:59:09.353Z - debug:  [17876] TFVC Minimum required version: 14.102.0
2017-06-15T16:59:09.353Z - debug:  [17876] TFVC (TF.exe, TF.cmd) version: 15.112.26421.0
2017-06-15T16:59:09.355Z - debug:  [17876] TFVC Repository.GetStatus
2017-06-15T16:59:09.356Z - debug:  [17876] TFVC: tf status -noprompt -format:detailed -recursive c:\tfs\EcoSys\SCM\Azure
2017-06-15T16:59:09.382Z - debug:  [17876] TFVC: spawned new process (duration: 25ms)

@markusmauch
Copy link

Authentication works now, however I'm getting this:
2017-06-16T06:58:04.541Z - error: [04216] The Team Services extension only supports TFS version 2015 Update 2 or later. Please verify your TFS server version.
However, our TFS verison is Version 15.112.26301.0. So it's a TFS 2017 acutally.

@Yaash19
Copy link

Yaash19 commented Jun 16, 2017

Thanks @jeffyoung for fixing authentication.

Authentication works for me but i had to give this in user settings, without this i would not able to connect.

"team.remoteUrl": "https://tfs.xyzcom/tfs/defaultcollection",
"team.teamProject": "abc"

Also , when i edit file, it does not check out the file.

why do i see that source control as GIT ?
image

@jeffyoung
Copy link
Contributor

Hi @markusmauch. Could you provide the rest of the log file (as an attachment, perhaps)? If you're using TFVC, there are a few other calls being made earlier that should log more helpful information.

Hi @Yaash19. If you have team.remoteUrl set, you're telling the extension that your source code is hosted on a non-Microsoft server (like BitBucket, GitLab, GitHub, etc.). Therefore, we don't even attempt to initialize the TFVC support. Since you do have team.remoteUrl set and you are able to connect, you should be able to simply open your local workspace folder (ensure your workspace is actually a Local workspace), then change the SCM Provider to TFVC. However, you will have to remove both team.remoteUrl and team.teamProject from your settings beforehand.

@Yaash19
Copy link

Yaash19 commented Jun 16, 2017

Hi @jeffyoung

Thanks for quick response.

This is what i see when i try to change source control ( i see no option to select TFVC)

image

Here is my log
team-extension1.txt

@jeffyoung
Copy link
Contributor

Thanks for the log @Yaash19. However, here's what I see:

2017-06-16T15:26:05.871Z - debug: [13516] Looking for an External Context at c:\Development\DEV\Projects\xyx\xyx
2017-06-16T15:26:05.871Z - debug: [13516] Found an External Context at c:\Development\DEV\Projects\xyx\xyx

That tells me that team.remoteUrl (and possibly team.teamProject) are still set. At least they were when the log file was written. If those are set, we won't even attempt to initialize the TFVC support (I suspect that is why TFVC support isn't showing up). In fact, there's no log entry about the value for tfvc.location either (which should also be written to the log if team.remoteUrl and team.teamProject are not set). Can you verify those are completely removed and try again?

@Yaash19
Copy link

Yaash19 commented Jun 16, 2017

@jeffyoung

without team.remoteurl and team.project, i see below error. I do have setup for local workspaces.

image

My log

team-extension2.txt

@jeffyoung
Copy link
Contributor

Thanks @Yaash19. Can you send a screenshot for your workspace (instructions here)? I'm investigating an issue where a user can get the TF30063 error but that occurs on the second call to workfold (not the first, like yours). In the cases I've seen where you get it with the first call, it's been due to a Server workspace (not Local).

@Yaash19
Copy link

Yaash19 commented Jun 19, 2017

@jeffyoung

here is my screenshot
image

image

Also here my log

team-extension1.txt

@mtpli
Copy link

mtpli commented Jul 4, 2017

I‘m using the latest version 1.119.0 for visual studio team services, but when I trying to use TFVC to connect TFS, Multiple attempts to do Team: Signin end up locking my account.

debug: [10188] Error: Failed Request: Unauthorized(401) - https://tfs***/tfs/defaultcollection/_apis/tfvc/branches

@jeffyoung
Copy link
Contributor

Hi @Yaash19. It's odd that the error occurs during the first call to 'workfold' with a Local workspace.

To gather more information, would you be willing to do either of the following?

  • Are you able to connect using any other workspaces you might have available? If you don’t have any, would it be possible to create a new one (it doesn’t have to be complex)?
  • Would you be willing to give the Team Explorer Everywhere Command Line Client a try instead (it requires Java on the client)? If you’d like to give it a try, here are the instructions I put together. If you do go this route and want to use the same workspace that you have been using, the CLC needs to be made aware that it exists. To do that, see these instructions.

@hmendezm
Copy link

Hi everybody,

I get the same problem of the rest.
team-extension.log

I have my PC and TFS in the same domain. I can call the _apis in my browser without problems.

Microsoft Visual Studio Team Foundation Server
Version 15.112.26301.0

Best Regards
H.

@markusmauch
Copy link

Maybe the problem is having more than one folder mapping in the workspace? I'm experiencing the issue since I've set up something like this.

@dmumladze
Copy link

dmumladze commented Dec 21, 2017

I'm getting a similar error, with or without proxy settings. I only have one folder mapping.

team-extension.log

Failed call with repositoryClient: Unauthorized. Check your authentication credentials and try again. Error: Error: Failed Request: Unauthorized(401) - https://tfs.somecompany.net/tfs/collection/_apis/tfvc/branches

Regards,
David

@Nehmiabm
Copy link

Nehmiabm commented Feb 8, 2019

I'm still facing the same 'unauthorized' issue even though I have correctly set the tfs location and I'm using a local workspace. What's the status on this issue?

@Chappitono
Copy link

I had exactly the same problem.
Switching File>Preferences/Settings/Http: Proxy Support to off solved it

proxy_off

@wilsonparson
Copy link

I had exactly the same problem.
Switching File>Preferences/Settings/Http: Proxy Support to off solved it

proxy_off

I have no idea why this works, but it also worked for me! Thank you so much for sharing.

@dmumladze
Copy link

@jeffyoung I hope this helps in troubleshooting:

Proxy authentication can be done either by NTLM, Digest, or Negotiate auth schemes.. In my corp case, it must be NTLM, but VSCode is doing the Negotiate..

How do I know NTLM works? I use cURL utility reguarly, which by default uses the Negotiate auth scheme, but once I forced it to the NTLM, it worked, so same for VSCode:

curl -x webproxy.net:8080 -U usernaname:password http://google.com --proxy-ntlm

You can try other options and see what works for you: --proxy-digest or --proxy-negotiate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.