From the last error trace:
The specified certificate is not valid for signing.
I expect the certificate to be a self-signed certificate , in which case you can take a look at this Microsoft documentation. Run the agent with a self-signed certificate.
From the first error trace:
try to import the certificate manually into the current store of user's personal certificates.
It is also possible that you did not install the certificate in the machine certificate store. please refer to the same link in this case .
You can double-check that the certificate is installed correctly by running this command:
PowerShell Invoke-WebRequest -Uri https://corp.tfs.com/tfs -UseDefaultCredentials
You can also get useful information about the "Ssl Support Client Certificate in Build / Release Job" on this page.
source share