We are using an internal certificate on our server and I\'ve followed the steps in
https://blogs.msdn.microsoft.com/tfssetup/2016/12/19/error-ssl-certificate-problem-una
I have an internally issued cert (not self-signed) for TFS. Here are the steps I took to get this working for my scenario:
After that, I followed the directions here to set the git config. The command(s) for that looked like this:
git config --global http."https://tfs/tfs/".sslCAInfo "path\to\cert\certificate.cer"
git config --system http."https://tfs/tfs/".sslCAInfo "path\to\cert\certificate.cer"
The last thing I did was restart the agent service and everything was fine after that.
EDIT: I'm also running the agent under a build service domain account.