I am trying to get a list of files checked out from my TFVC repository hosted on Azure DevOps. I am the administrator of the repository. I have a local workspace, and all file changes take place through Visual Studio (2017), which does a formal check-out of each file as I change it.
My plan was to use the "tf status" command to connect to and query the repository, but I can't get past authentication issues. I first tried this command.
tf status /Collection:https://example.visualstudio.com/MyProject /login:me#example.com,MyPassword
It responded with the error:
TF31002: Unable to connect to this Team Foundation Server: https://example.visualstudio.com/MyProject.
Team Foundation Server Url: https://example.visualstudio.com/MyProject.
Possible reasons for failure include:
- The name, port number, or protocol for the Team Foundation Server is incorrect.
- The Team Foundation Server is offline.
- The password has expired or is incorrect.
Technical information (for administrator):
The remote server returned an error: (404) Not Found.
I tried to access the default collection:
tf status /Collection:https://example.visualstudio.com/DefaultCollection /login:me#example.com,MyPassword
This time, the error is different.
TF30063: You are not authorized to access https://example.visualstudio.com/DefaultCollection.
TF30063: You are not authorized to access https://example.visualstudio.com/DefaultCollection.
If I leave off the trailing collection name:
tf status /Collection:https://example.visualstudio.com /login:me#example.com,MyPassword
It returns a related error.
TF30063: You are not authorized to access example.visualstudio.com\example.
TF30063: You are not authorized to access example.visualstudio.com\example.
I found a similar question at tf.exe authenticate for vsts, but in that question, the OP was using an on-site TFS instance. My repository is only stored in VSTS / Azure DevOps.
How can I get a list of checked out files, that is, of files modified but not yet checked in from my local workspace?
Related
I am trying to connect latest version (2019.3.4) of Rider to TFS (on premise, TFS 2010).
I went through the steps in their community support (https://rider-support.jetbrains.com/hc/en-us/articles/360000335099-How-to-use-Visual-Studio-s-TFV%D0%A1-local-workspace-in-Rider), and got stuck on the step #6.
Go to VCS -> TFVS -> Manage Workspaces, select your server, and press "Reload workspaces"
I am getting the following error when clicking reload:
If I try to click 'Edit' button, I get a different error:
When I try to view file history, I get this warning
13:50 Problems while loading file history: HTTP 401 Unauthorized
Rider never asked me to authenticate with my VCS (and I see no way of doing that).
What should I do to make it work?
Thanks
The documentation you refer to is using Visual Studio's TFVС local workspace, while TFS 2010 only supports Server workspace. Local & server workspace:
https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/decide-between-using-local-server-workspace?view=azure-devops
Azure DevOps plugin supports working with Git and TFVC repositories on Azure DevOps Services or Team Foundation Server (TFS) 2015+, and support Local workspace only.
So, the answer by Cece is helpful, but does not solve the problem.
It simply turned out that I need a different plugin to Rider.
The one installed by default in recent releases is for Azure DevOps.
There is another one, called TFS - and that's the one to use.
https://plugins.jetbrains.com/plugin/4578-tfs/
I can open internet explorer and login just fine.
Credentials are saved in the credential manager.
Trying to access any tf.exe command results in a TF30063 error.
I do not have VS installed on this machine.
Any suggestions on what to try?
UPDATE:
Here are the step I've taken to get this error.
Login to VS Team Services via IE
At the command prompt:
C:\>tf.exe status /collection:https://xxxxx.visualstudio.com/DefaultCollection
C:\>tf.exe workspaces /collection:https://xxxxx.visualstudio.com
C:\>tf.exe workspace /new /collection:https://xxxxx.visualstudio.com
I've also tried a few others and everyone of them return with the same unauthorized error.
These commands all work on another server that's connected to the same tfs repo with the same credentials, which leads me to believe it's something in IE and/or internet security options.
Taking add files and folders to version control as example, you can specify the user account /login:username,[password] in the command:
tf add itemspec [/lock:(none|checkin|checkout)] [/encoding:filetype]
[/noprompt] [/recursive] [/noignore] [/login:username,[password]]
More commands, see: https://www.visualstudio.com/en-us/docs/tfvc/use-team-foundation-version-control-commands
To use tf.exe command, you need either Visual Studio or Team Explorer is installed. More details please refer Command-line tools for TFS
I'm trying to connect to a new TFS server in Visual Studio 2015. I already have a local TFS server on my dev machine. When I attempt to add the new TFS server in the "Add Team Foundation Server" prompt it allows me to enter the URL, path and port number, but no credentials. Without credentials it can't connect to the server because it's supplying my local admin credentials instead of my active directory ID.
I've tried Credential Manager in Control Panel but it is empty. I've tried clearing my internet explorer cache/passwords/everything. I've tried running Visual Studio with the /netonly switch and supplied my AD credentials. None of this has worked.
How do I add a new TFS server to my list that I can connect to?
Close VS, and clean the cache file under C:\Users\username\AppData\Local\Microsoft\Team Foundation\6.0\Cache.
Check Windows Credentials in the Credential Manager to see if there stores credentials.
Remove the local TFS in Add/Remove Team Foundation Server.
After the steps above, when you connect new TFS, a windows should promote to let you enter credential.
Has anyone successfully set up VSO & Jenkins & TFS?
Server URL: https://<myproject>.visualstudio.com/DefaultCollection
Login name and user password (using alternative credentials)
What domain name did you use? <domain>\username
If I run the tf command in Command Prompt, it succeeds, but Jenkins shows the same command as failing. I'm lost as to how to debug this. I also tried setting cached credentials for TFS, and not caching them. It seems as though Jenkins does not have cached credentials, but my command prompt does? Why would my system have stored credentials for me, but not Jenkins?
Error from Jenkins: TF30063: You are not authorized to access https://windwardstudios.visualstudio.com/DefaultCollection
With the release of version 4.0.0 of the Jenkins Team Foundation Server plugin, Team Foundation Version Control (TFVC) from Visual Studio Online (VSO) is now officially supported and both Personal Access Tokens (PAT) & alternate credentials can be used.
See the section User name and password in the wiki page.
This is an answer, but may not be what you want to hear. This used to work for us about a year ago. It required someone to stay logged into VisualStudio.com with his MSDN credentials on the build server. Then we simply didn't use credentials in the Jenkins TFS plug-in. Then one day, that simply stopped working. We tried alternative credentials, as #MrHinsh suggested, but never got it to work. Eventually we gave up and switched all of our TFS repositories to git (but still hosted on VisualStudio.com). That does work with the alternate credentials, and we have been very pleased since.
You need to configure Jenkins yo use the alternate credentials. It will not work with any other configuration and the credentials are never stored. Every command that you pass must include the same creds.
I've browsed every post about TFS and Hudson I could find but nothing useful has popped up.
In Hudson when I attempt a build, the console output provides:
Started by user jlowder
[workspace] $ tf workspaces -format:brief -server:http://ashpteam01.hq.hanger.com:8080 **
TF30063: You are not authorized to access http://ashpteam01.hq.hanger.com:8080/.
FATAL: Executable returned an unexpected result code [100]
ERROR: null
[DEBUG] Skipping watched dependency update for build: NextGen Automation #25 due to result: FAILURE
Finished: FAILURE
If I manually run the tf command above from a command prompt, it works. I access TF from Visual Studio 2010 just fine.
I receive this error regardless if an attempt to access TFS comes from Hudson or Team City. My login to TFS is my domain user name and password, which I have checked and re-checked.
What am I missing here?
If you go to Control Panel > Network Passwords, are there any saved passwords there for your server? TFS will always try and authenticate using these first. If one is saved, and it is incorrect - you will get this error.
Also, what URL do you connect to in Visual Studio? Does it have a /tfs/ on the end?
It appears that the domain the server was running on would not send back to the domain I was requesting from. Moving hudson and tfs to same domain