Failed for the root '"XXX Git" {instance id=225, parent internal id=48, parent id=XXX_YYY_Git, description: "https://tfsinstance/tfs/DefaultCollection/TeamProject/_git/GitRepository#refs/heads/master"}: List remote refs failed: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Your corporate certificate is not known by TeamCity. This is how you fix the problem.
Save your corporate root certificate into CompanyRoot.cer file
For server side checkout:
- Login to the TeamCity server machine
- Add this root certificate to keystore of your TeamCity
(replace %TeamCityInstallDir% with actual path to your TeamCity)
If you haven't ever changed it, password for the keystore is changeit :)
For agent side checkout:
- Install Git on agent machine to lets say C:\Programs\Git\
- Run on agent machine git config --global http.sslCAInfo D:\Programs\Git\bin\curl-ca-bundle.crt
- Edit curl-ca-bundle.crt manually, add your Company root certificate to the end of the file
Mor information can be found here: