Since the release of Visual Studio (Online) with GIT support, I tried to understand GIT and how it works with the tools I have.
Of course I understand Visual Studio and I’m still using Team Foundation Server (TFS) together with Team Explorer. No problem there. Nowadays we have GIT and yes it’s really easy to connect to my Visual Studio Online GIT repository.
(I presume you already connected to a GIT repository with Visual Studio, otherwise check this link from the MSDN documentation.)
But what about the other tools? GIT Bash, SourceTree or even XCode? My first attempt gave me a nice “fatal: Authentication failed for ….” error in SourceTree.
What is going on? Apparently we need basic authentication enabled to use other 3rd party tools. There are some hints in the MSDN documentation or when you create your first Visual Studio Online project, however most of the time you start with an existing customers project.
Tip: You can get the url of your repository from Visual Studio Online -> project -> code tab -> Clone (paper icon on the right)
So let’s fix this with a few steps:
- Go to Visual Studio Online with your browser and login with your own Microsoft account.
- Click on your name (on the right) and a second screen will appear.
Then click on “My Profile”. You will see a nice pop-up windows. - Go to the third tab “Credentials” and click on the link “Enable alternate credentials”.
- Now fill in your username and password.
- Done!! You now can login with your favorite tools!
Example Git Bash:
Example SourceTree: