Developing on Staxmanade

Authentication error connecting to Git on TFS

I’m throwing this out there since I couldn’t find much on this specific problem. #payingItForward


I struggled getting the git command line to authenticate with Git Team Foundation Service online.

My current environment is Windows 8, msysgit, with the git-credential-winstore tool installed. (Love that credential tool)

When I first tried to (push, fetch, or pull) from a newly created TFS Git repository I received git-credential-winstore authentication dialog, entered my credentials and received the following error,

Failed to erase credential: Element not found
fatal: Authentication failed

After googling that error I found this link who’s approach did not work in my case.

Solution: Short Version

  1. Log into your TFS account (online)
  2. go to your account settings then credentials
  3. setup the alternate login

Solution: Long version

  1. First go to the following link:  Use Git  and XCode with TFS
  2. scroll down to the section titled:

    Enable basic authentication for your account

  3. Follow those directions
Hope this helps.

Happy Git-ing!