Struggling to get Git to connect to VisualStudio.com? Here’s a possible solution:
Tip: A proxy/firewall can be one of the causes of this frustration.
A big shout out to Andrew Scott for working on this with me.
1. Install the Git Credential Manager for Windows
Go to https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases, or you can also get this from the Git Installer for Windows at https://git-scm.com/download/win.
2. Get your Personal Access Token
Go to xxx.visualstudio.com where ‘xxx’ is your Visual Studio Online tenant name.
Click on your user icon then choose “Security.” You should now be on the Personal Access Token page.
Click the “Add” button then type a description and select “Other Options.” Choosing an expiration of a year will reduce the pain of having to do this process more often.
Click “Create Token” at the bottom. Now you should see your token.
Copy this. Note: your token will only display once.
3. Add your credential to the Windows Credential Manager
Open the Credential Manager in Windows by searching for “Credential Manager” from the Start menu.
Click “Add a Generic Credential.”
Add your Internet or network address: git: https://(your vs site name).visualstudio.com.
Your user name is “Personal Access Token” (yes, this is the user name).
Paste your personal access token as the “Password.”
4. Use Visual Studio or your tool of choice to clone your repo
These steps should get you up and running!
Note: You may have to periodically clean these items out if things stop working for you. You can always create a new token and make a new entry in the Credential Manager.
What other issues would you like the IntelliTect team to break down for you?

Does Your Organization Need a Custom Solution?
Let’s chat about how we can help you achieve excellence on your next project!
One other note…
If you already have the Credential Manager installed and then things start not working, here is what to do.
Open the Windows Credential Manager and delete every entry related to the repo you are trying to use.
Depending on how the credentials work for the service you are using, you might just be able to try a connection again and things work. You may need to get another token.
Also, if you are deleting tokens you are no longer using, delete them from TFS/VSTS so you minimize your attack surface area.
Wow, I’ve been searching for this simple solution for 2 hours now…unbelievable that running Credential Manager to update a token doesn’t seem to be documented anywhere. Thanks!
Thanks for this! Just helped me as well at client site. Note I didn’t have to use a PAT, I did have to update my password though.