Irritating problem

There is an amalgam of complaints about this issue already on the product form, you can view them here:

The scenario for this problem to play out is like so:

  1. Your TFS administrators have changed the URL to your copy of TFS
  2. Uou are using Git and not TFVC
  3. You update your team connection in Visual Studio 2017 to point to the new URL
  4. You now see that your Visual Studio 2017 instance will not recognize the fact that you already have a repo downloaded

Possible workaround

I am not going to say this is going to work for everyone. I feel like because TFS Git is still buggy you have to coerce TFS to work sometimes using alternate means. Out of habit, because TFS doesn’t seem to be quite finished baking yet when it comes to Git, I have SourceTree installed as a back up. Here is what I just did (writing it down while it is still in my mind):

  1. Close all Visual Studio instances to err on the side of caution (it can block you sometimes)
  2. I updated my connection information in SourceTree for the target repo I am working with
    1. Open your local repo
    2. At the top in the menu bar, click on:
      1. Repository
      2. Repository Settings…
      3. Edit your URL
    3. Alternatively you can edit the URL by editing the config file if that is easier for you:
      1. <YourRepo>\.git\config
      2. You will see your URL in there, just edit it – it can potentially show up multiple times, change all of them
  3. I committed my local changes with SourceTree
  4. I pushed my changes with SourceTree
  5. I re-opened Visual Studio using the solution associated with my local repo
  6. I attempted to re-establish a connection between my solution and the server and for some reason this worked…

I can’t explain why this worked, but it did.

If I had to guess, SourceTree over-wrote something or unjarred something for a lack of better explanation.

I hope Microsoft fixes this problem soon because it is a huge time waster.

SourceTree side note

If you are using SSL for your TFS URL and SourceTree gives you a problem with your connection because of this, then make SourceTree ignore SSL.

fatal: unable to access <URL>: SSL certificate problem: unable to get local issuer certificate

Check out the answer here:

Tools > Options > Git > Disable SSL certificate validation (ticked)

Leave a Reply

Your email address will not be published. Required fields are marked *