Use Git Credential Managers to Authenticate to Visual Studio Team Services

Last Update: 1/23/2017

Team Services | TFS 2015 & 2017| Visual Studio 2015 & 2017

Git Credential Managers simplify authentication with your Team Services/TFS Git repos. Credential Managers let you use the same credentials that you use for the Team Services/TFS web interface and support multi-factor authentication through Microsoft Account (MSA) or Azure Active Directory (AAD). In addition to supporting multi-factor authentication with Team Services, the credential managers also provide support two-factor authentication with GitHub repositories.

Team Services provides IDE support for MSA and AAD authentication through Team Explorer in Visual Studio, IntelliJ and Android Studio with the Team Services Plugin for IntelliJ, and Eclipse (with the Team Explorer Everywhere plug-in). If your environment doesn't have an integration available, configure your IDE with a Personal Access Token or SSH to connect with your to your repos.

Install the Git Credential Manager


Download and run the latest Git for Windows installer, which includes the Git Credential Manager for Windows. Make sure to leave the Git Credntial Manager installation option enabled when prompted.

Select Enable Git Credential Manager during Git for Windows install

macOS and Linux

Review the system and software requirements before installing the credential manager.

On Mac OS X and Linux, there are several install options that use native package managers to install the credential manager. After installing the package for your platform, run the following command to configure Git to use the credential manager :

> git-credential-manager install

Using the Git Credential Manager

When you connect to a Team Services Git repository from your Git client for the first time, the credential manager will prompt for your Microsoft Account or Azure Active Directory credentials. If your account has multi-factor authentication enabled, you will go through that experience as well.

Git Credential Manager prompting during Git pull

Once authenticated, the credential manager will create and cache a personal access token for future connections to the repo. Git commands that connect to this account will not prompt for user credentials until the token expires or is revoked through Team Services/TFS.

Getting help

You can open up and report issues with the Git Credential Manager for Windows on the project GitHub. Frequently Asked Questions for the Git Credential Manager for Windows are available in the online readme.

Manual installation steps for the Windows Git Credential Manager and the Mac OS X and Linux Git Credential Manager are available. Use these steps to install the credential manager if the recommended steps above are not suitable for your environment.

Learn more

In addition to providing full source code, we've also documented how the credential manager integrates with Git. Refer to the MSDN blog posts on the Mac OS X and Linux Git Credential Manager and the Windows Credential Manager. There is also an article on the project GitHub with information on the low-level internals of the Git Credential Manager for Windows.