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

An error occurred: Access denied connecting to TFS server http://****:8080/ (authenticating as fake) #352

Closed
obrienwritescode opened this issue Dec 12, 2017 · 4 comments

Comments

@obrienwritescode
Copy link

Hello, when opening local code the extension is not prompting for signin. However when I set the remote url and team project it works fine. My logging is attached as well.
team-extension.log

@Rainson12
Copy link

i have the exact same issue! Full Log:
`2018-01-12T14:29:50.333Z - info: [08328] *** FOLDER: c:\Develop ***
2018-01-12T14:29:50.334Z - info: [08328] VSTSVSCode/1.122.0 (VSCode 1.19.2; Windows_NT 6.3.9600; Node 7.9.0)
2018-01-12T14:29:50.334Z - debug: [08328] Looking for an External Context at c:\Develop
2018-01-12T14:29:50.334Z - debug: [08328] No External Context at c:\Develop
2018-01-12T14:29:50.335Z - debug: [08328] Looking for TFVC repository at c:\Develop
2018-01-12T14:29:50.335Z - debug: [08328] TFVC Creating Tfvc object with localPath='undefined'
2018-01-12T14:29:50.336Z - debug: [08328] Using TFS proxy:
2018-01-12T14:29:50.336Z - debug: [08328] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\TEE-CLC\tf.cmd'
2018-01-12T14:29:50.344Z - debug: [08328] TFVC Repository created with repositoryRootFolder='c:\Develop'
2018-01-12T14:29:50.345Z - debug: [08328] TFVC Repository.CheckVersion
2018-01-12T14:29:50.346Z - debug: [08328] TFVC: tf add -noprompt -?
2018-01-12T14:29:50.351Z - debug: [08328] TFVC: spawned new process (duration: 5ms)
2018-01-12T14:29:50.353Z - debug: [08328] TFVC: spawned new process (duration: 2ms)
2018-01-12T14:29:57.102Z - debug: [08328] TFVC: add exit code: 0 (duration: 6756ms)
2018-01-12T14:29:57.103Z - debug: [08328] TFVC Minimum required version: 14.0.4
2018-01-12T14:29:57.103Z - debug: [08328] TFVC (TF.exe, TF.cmd) version: 14.123.1.201709051449
2018-01-12T14:29:57.103Z - debug: [08328] TFVC Repository.FindWorkspace with localPath='c:\Develop'
2018-01-12T14:29:57.104Z - debug: [08328] TFVC: tf workfold -noprompt c:\Develop
2018-01-12T14:29:57.105Z - debug: [08328] TFVC: spawned new process (duration: 1ms)
2018-01-12T14:30:00.011Z - debug: [08328] TFVC: workfold exit code: 0 (duration: 2906ms)
2018-01-12T14:30:00.011Z - debug: [08328] Found a TFVC repository for url: 'http://tfsserver:8080/tfs/mordor/' and team project: 'Web'.
2018-01-12T14:30:00.012Z - debug: [08328] Parsing values from repositoryInfo as string url
2018-01-12T14:30:00.012Z - debug: [08328] TFVC Creating Tfvc object with localPath='undefined'
2018-01-12T14:30:00.014Z - debug: [08328] Using TFS proxy:
2018-01-12T14:30:00.014Z - debug: [08328] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\TEE-CLC\tf.cmd'
2018-01-12T14:30:00.014Z - debug: [08328] TFVC Repository created with repositoryRootFolder='c:\Develop'
2018-01-12T14:30:00.094Z - error: [08328] You are not connected to a Team Foundation Server. Please run the 'team signin' command.
2018-01-12T14:30:28.155Z - debug: [08328] Starting sign in process
2018-01-12T14:30:33.030Z - info: [08328] Signin: Username and Password provided as authentication.
2018-01-12T14:30:33.078Z - debug: [08328] Reinitializing after successfully storing credentials for Team Foundation Server.
2018-01-12T14:30:33.079Z - debug: [08328] Polling interval value (minutes): 5
2018-01-12T14:30:33.082Z - info: [08328] *** FOLDER: c:\Develop ***
2018-01-12T14:30:33.082Z - info: [08328] VSTSVSCode/1.122.0 (VSCode 1.19.2; Windows_NT 6.3.9600; Node 7.9.0)
2018-01-12T14:30:33.083Z - debug: [08328] Looking for an External Context at c:\Develop
2018-01-12T14:30:33.083Z - debug: [08328] No External Context at c:\Develop
2018-01-12T14:30:33.083Z - debug: [08328] Looking for TFVC repository at c:\Develop
2018-01-12T14:30:33.083Z - debug: [08328] TFVC Creating Tfvc object with localPath='undefined'
2018-01-12T14:30:33.084Z - debug: [08328] Using TFS proxy:
2018-01-12T14:30:33.084Z - debug: [08328] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\TEE-CLC\tf.cmd'
2018-01-12T14:30:33.085Z - debug: [08328] TFVC Repository created with repositoryRootFolder='c:\Develop'
2018-01-12T14:30:33.086Z - debug: [08328] TFVC Repository.CheckVersion
2018-01-12T14:30:33.086Z - debug: [08328] TFVC: tf add -noprompt -?
2018-01-12T14:30:33.089Z - debug: [08328] TFVC: spawned new process (duration: 1ms)
2018-01-12T14:30:33.197Z - debug: [08328] TFVC: add exit code: 0 (duration: 110ms)
2018-01-12T14:30:33.197Z - debug: [08328] TFVC Minimum required version: 14.0.4
2018-01-12T14:30:33.197Z - debug: [08328] TFVC (TF.exe, TF.cmd) version: 14.123.1.201709051449
2018-01-12T14:30:33.197Z - debug: [08328] TFVC Repository.FindWorkspace with localPath='c:\Develop'
2018-01-12T14:30:33.197Z - debug: [08328] TFVC: tf workfold -noprompt c:\Develop
2018-01-12T14:30:33.199Z - debug: [08328] TFVC: spawned new process (duration: 1ms)
2018-01-12T14:30:34.856Z - debug: [08328] TFVC: workfold exit code: 0 (duration: 1658ms)
2018-01-12T14:30:34.856Z - debug: [08328] Found a TFVC repository for url: 'http://tfsserver:8080/tfs/mordor/' and team project: 'Web'.
2018-01-12T14:30:34.856Z - debug: [08328] Parsing values from repositoryInfo as string url
2018-01-12T14:30:34.856Z - debug: [08328] TFVC Creating Tfvc object with localPath='undefined'
2018-01-12T14:30:34.857Z - debug: [08328] Using TFS proxy:
2018-01-12T14:30:34.858Z - debug: [08328] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\TEE-CLC\tf.cmd'
2018-01-12T14:30:34.858Z - debug: [08328] TFVC Repository created with repositoryRootFolder='c:\Develop'
2018-01-12T14:30:34.871Z - debug: [08328] Started ApplicationInsights telemetry
2018-01-12T14:30:34.871Z - info: [08328] Getting repository information with repositoryInfoClient
2018-01-12T14:30:34.871Z - debug: [08328] RemoteUrl = http://tfsserver:8080/tfs/mordor/
2018-01-12T14:30:34.872Z - debug: [08328] Getting repository information for a TFVC repository at http://tfsserver:8080/tfs/mordor/
2018-01-12T14:30:34.873Z - debug: [08328] Parsing values from repositoryInfo as string url
2018-01-12T14:30:34.873Z - debug: [08328] Starting the validation of the collection. Url: 'http://tfsserver:8080/tfs/mordor/'
2018-01-12T14:30:34.922Z - debug: [08328] Validated the collection and splitting Url and Collection name. Collection name: 'mordor', Url: 'http://tfsserver:8080/tfs/'
2018-01-12T14:30:34.922Z - debug: [08328] Getting project collection... url: 'http://tfsserver:8080/tfs/', and collection name: 'mordor'
2018-01-12T14:30:34.922Z - debug: [08328] Using SOAP to get the project collection information
2018-01-12T14:30:35.062Z - debug: [08328] Found a project collection for url: 'http://tfsserver:8080/tfs/' and collection name: 'Mordor'.
2018-01-12T14:30:35.063Z - debug: [08328] Getting team project... Url: 'http://tfsserver:8080/tfs/', collection name: 'Mordor', and project: 'Web'
2018-01-12T14:30:35.103Z - debug: [08328] Found a team project for url: 'http://tfsserver:8080/tfs/', collection name: 'Mordor', and project id: 'd0328e41-a37e-4e25-8bb0-39be32c4350a'
2018-01-12T14:30:35.103Z - debug: [08328] Repository information blob:
2018-01-12T14:30:35.104Z - debug: serverUrl=http://tfsserver:8080/tfs/, id=3283D0DD-1B24-4005-8199-A49EB69D0294, name=Mordor, url=http://tfsserver:8080/tfs/_apis/projectCollections/3283D0DD-1B24-4005-8199-A49EB69D0294, id=00000000-0000-0000-0000-000000000000, name=NoNameTfvcRepository, url=http://tfsserver:8080/tfs/, id=d0328e41-a37e-4e25-8bb0-39be32c4350a, name=Web, description=Web-Team, url=http://tfsserver:8080/tfs/Mordor/_apis/projects/d0328e41-a37e-4e25-8bb0-39be32c4350a, state=1, revision=15, remoteUrl=http://tfsserver:8080/tfs/
2018-01-12T14:30:35.104Z - debug: [08328] Parsing values from repositoryInfo object as any
2018-01-12T14:30:35.105Z - debug: [08328] _collection: Mordor
2018-01-12T14:30:35.105Z - debug: [08328] _collectionId: 3283D0DD-1B24-4005-8199-A49EB69D0294
2018-01-12T14:30:35.105Z - debug: [08328] _repositoryId: 00000000-0000-0000-0000-000000000000
2018-01-12T14:30:35.105Z - debug: [08328] _repositoryName: NoNameTfvcRepository
2018-01-12T14:30:35.106Z - debug: [08328] _teamProject: Web
2018-01-12T14:30:35.106Z - debug: [08328] _isTeamFoundationServer: true
2018-01-12T14:30:35.106Z - debug: [08328] Finished getting repository information for the repository at http://tfsserver:8080/tfs/mordor/
2018-01-12T14:30:35.106Z - info: [08328] Getting connectionData with accountClient
2018-01-12T14:30:35.106Z - debug: [08328] connectionUrl = http://tfsserver:8080/tfs/Mordor
2018-01-12T14:30:35.125Z - info: [08328] Retrieved connectionData with accountClient
2018-01-12T14:30:35.126Z - debug: [08328] Found pinned queries in user configuration settings.
2018-01-12T14:30:35.126Z - debug: [08328] No account-specific pinned query or global pinned query found. Using default.
2018-01-12T14:30:35.126Z - info: [08328] Sent extension start up telemetry
2018-01-12T14:30:35.126Z - debug: id=01e3a444-f067-4537-af1a-268a476f23aa, descriptor=System.Security.Principal.WindowsIdentity;S-1-5-21-405680416-1421812660-549785860-1...
2018-01-12T14:30:35.127Z - debug: [08328] repositoryFolder: c:\Develop
2018-01-12T14:30:35.128Z - debug: [08328] repositoryRemoteUrl: http://tfsserver:8080/tfs/mordor/
2018-01-12T14:30:35.128Z - debug: [08328] IsSsh: false
2018-01-12T14:30:35.128Z - debug: [08328] proxy: not enabled, team services: false
2018-01-12T14:30:35.129Z - info: [08328] Sent TFVC tooling telemetry
2018-01-12T14:30:35.129Z - debug: [08328] Initializing the TfvcSCMProvider
2018-01-12T14:30:35.129Z - debug: [08328] TFVC Repository.CheckVersion
2018-01-12T14:30:35.129Z - debug: [08328] TFVC: tf add -noprompt -?
2018-01-12T14:30:35.131Z - debug: [08328] TFVC: spawned new process (duration: 1ms)
2018-01-12T14:30:35.195Z - debug: [08328] TFVC: add exit code: 0 (duration: 65ms)
2018-01-12T14:30:35.195Z - debug: [08328] TFVC Minimum required version: 14.0.4
2018-01-12T14:30:35.196Z - debug: [08328] TFVC (TF.exe, TF.cmd) version: 14.123.1.201709051449
2018-01-12T14:30:35.196Z - debug: [08328] TFVC Repository.GetStatus
2018-01-12T14:30:35.196Z - debug: [08328] TFVC: tf status -noprompt -collection:http://tfsserver:8080/tfs/Mordor ******** -format:xml -recursive c:\Develop
2018-01-12T14:30:35.198Z - debug: [08328] TFVC: spawned new process (duration: 1ms)
2018-01-12T14:30:39.127Z - info: [08328] Polling for latest current build status...
2018-01-12T14:30:39.127Z - info: [08328] Getting current build from badge...
2018-01-12T14:30:39.128Z - info: [08328] Polling for the pinned work itemquery
2018-01-12T14:30:39.128Z - info: [08328] Running pinned work item query to get count (Web)...
2018-01-12T14:30:39.198Z - info: [08328] No builds were found for team Web, repo id 00000000-0000-0000-0000-000000000000, + branch UNKNOWN
2018-01-12T14:32:04.970Z - debug: [08328] TFVC: status exit code: 0 (duration: 89774ms)
2018-01-12T14:32:04.972Z - debug: [08328] TFVC Repository.FindConflicts
2018-01-12T14:32:04.972Z - debug: [08328] TFVC: tf resolve -noprompt -collection:http://tfsserver:8080/tfs/Mordor ******** c:\Develop -recursive -preview
2018-01-12T14:32:04.974Z - debug: [08328] TFVC: spawned new process (duration: 2ms)
2018-01-12T14:32:12.455Z - debug: [08328] TFVC: resolve exit code: 100 (duration: 7483ms)
2018-01-12T14:32:12.456Z - debug: [08328] TFVC errors (via stderr): An error occurred: Access denied connecting to TFS server http://tfsserver:8080/ (authenticating as DOMAIN\ACCOUNT)

2018-01-12T14:32:12.456Z - error: [08328] Caught an exception during Tfvc SCM Provider initialization
2018-01-12T14:32:12.456Z - error: [08328] Execution of the TFVC command line failed unexpectedly. An error occurred: Access denied connecting to TFS server http://tfsserver:8080/ (authenticating as DOMAIN\ACCOUNT)`

@mikaryyn
Copy link

@obrienwritescode I encountered this today and was able to get it working by adding this to VSCode user settings:

    "tfvc.restrictWorkspace": true

I found the solution by looking at where the "fake" comes from. This is the source of the problem: https://github.com/Microsoft/vsts-vscode/blob/aed6d2ebb4b1281c651f46178b9bf47c0e693bd1/src/tfvc/commands/findworkspace.ts#L42

@Rainson12
Copy link

Rainson12 commented Jan 31, 2018

I still get the same error message even with "tfvc.restrictWorkspace": true in my settings

I found out that my issue is caused by a umlaut in my password like "ä or ü"

@pmcelhaney
Copy link

I had the same problem. It turned out that the "fake" credentials were stored in OSX Keychain. It worked after I removed them from the keychain and entered a command with -login to reset them.

I've documented the complete list of steps that worked for me on Stack Overflow.

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

No branches or pull requests

5 participants