title: Team Foundation Server 2015 git repo with submodules on external git servers
body: <p>I've got Team Foundation Server 2015 installed. Everything is working great expect one thing.</p>
  
  <p>I am working with two main <a href="/questions/tagged/git" class="post-tag" title="show questions tagged &#39;git&#39;" rel="tag">git</a> repositories (Created from team projects). The build for the first repository works great but the build for the second repository has problems.</p>
  
  <p>The first has sub-modules that live on the TFS <a href="/questions/tagged/git" class="post-tag" title="show questions tagged &#39;git&#39;" rel="tag">git</a> server itself. The build works great here.</p>
  
  <p>The second has sub-modules that live on a different <a href="/questions/tagged/git" class="post-tag" title="show questions tagged &#39;git&#39;" rel="tag">git</a> server. When this build runs TFS fails to obtain those submodules:</p>
  
  <pre><code>******************************************************************************
      Starting: Get sources
  ******************************************************************************
  Syncing repository: my_app (Git)
  Checking out dbab6... to C:\TfsBuildAgents\Agent-UTP120W-1\_work\5\s with submodules
  
  Object not found - no matching loose object (f8334...)
  
  Prepare repository failed with exception.
  </code></pre>
  
  <p>(I've abbreviated the SHA's here for simplicity)</p>
  
  <p>The SHA that starts with <code>f8334...</code> is the submodule that lives on an external git server. My guess is that this error: </p>
  
  <blockquote>
    <p>Object not found - no matching loose object</p>
  </blockquote>
  
  <p>actually has something to do with the credentials that TFS is attempting to use on the remote server. Is there a way to see which credentials TFS is using to interact with the remote server? Is there a way to configure these credentials myself?</p>
  
  <p>I attempted to change the <code>repository type</code> in the build settings from <code>git</code> to <code>external git</code> so that I could specify credentials. However, this results in yet a different error:</p>
  
  <pre><code>******************************************************************************
      Starting: Get sources
  ******************************************************************************
  Syncing repository: my_app (Git)
  
  Too many redirects or authentication replays
  
  Prepare repository failed with exception.
  </code></pre>
  
  <p>Google results for both this error: </p>
  
  <blockquote>
    <p>Too many redirects or authentication replays</p>
  </blockquote>
  
  <p>and the previous don't seem to turn up anything useful for this scenario. Anyone have any clues?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>It looks like TFS 2015 only supports repos with <a href="http://visualstudio.uservoice.com/forums/330519-team-services/suggestions/3606383-add-submodule-support-in-visual-studio-git-extensi" rel="nofollow">submodules that are in TFS itself, or are anonymously accessible</a>. However, a <a href="http://visualstudio.uservoice.com/forums/330519/suggestions/11462817" rel="nofollow">new feature request was created</a> to address external authentication for submodules.</p>
  
  <p>However, in my case the external git server <em>is anonymously accessible</em>. So, unfortunately, I'm guessing that the problem somehow lies with my external git server? For reference it is the open source software <a href="https://bonobogitserver.com/" rel="nofollow">Bonobo Git server</a>.</p>