visual-studiogit-tf

How can I log into Visual Studio Online using git-tf?


I'm trying to git tf clone a project on Visual Studio Online that is using TFVC, I'm running the following command:

git tf clone https://{user-url}.visualstudio.com/DefaultCollection {project_path}

It then asks for a username and password, but when I use my login credentials for Visual Studio Online, it won't log in.

How can I log into Visual Studio Online from the git-tf command line?


Solution

  • You must enable alternate credentials before using a tool like git-tf with Visual Studio Online.

    From the Visual Studio Online web interface, click on your profile name in the top-right corner. Then select "My Profile". In the "window" that pops up, select the "Credentials" tab. Now click "Enable Alternate Credentials" and provide an alternate password. After saving this setting, the git tf clone command should now work when you enter your alternate credentials.