Search code examples
gittfstfs-2015

Can't find git folder in TFS 2015 build agent folder


I'm trying to configure git settings on a TFS 2015 build agent so that I can add a new certificate as described in TFS Build Agent failing to connect to HTTPS git in TFS 2017 when running as service

When I go to the "agent" folder, there is no "externals" folder. I've tried searching and haven't found the "git" folder or any git executables under the TFS agent.

Git isn't installed on the build agent machine, but it is attempting to clone the repository when I run a build - so git must be there somewhere.

How can I find where the git installation is so that I can change the configuration for it?

Can I just install git in the standard location and make global changes? And, if so, will this be picked up by the TFS build agent?


Solution

  • As explained in "Commit to Git: Source Control in Visual Studio 2015":

    The Visual Studio 2015 IDE relies on the LibGit2 API and the LibGit2Sharp communication layer to implement all of the Git features it exposes in its front-end tooling.

    • LibGit2 is a zero-­dependency, cross-platform, open source Git core engine written entirely in C.
    • LibGit2Sharp is a library written in C# that runs as a managed process under the Microsoft .NET Framework.
      It serves as a .NET-friendly interface between Visual Studio and LibGit2 and it dramatically simplifies the programming effort required by the Visual Studio development team to establish a communication pipeline to and from the LibGit2 library.

    So it would not need a separate Git installation.