0
votes

I've installed TFS 2018. Now I am trying to install a remote agent (from another machine). I am getting this error:

enter image description here

I've checked this and I have found this documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/certificate?view=azure-devops-2019

I think this issue is related to the fact that the machine is not trusting the certificated TFS Generated during the installation. I also checked the log file:

[2019-02-18 13:48:33Z ERR  VisualStudioServices] GET request to https://jbpatfssr005/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1 failed. System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: A security error occurred at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

(...)

[2019-02-18 13:48:33Z ERR  AgentServer] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: A security error occurred

In my browser when I try to access TFS I get a message sayng that the site is insecure. enter image description here

So I guess this is really because of the certificate. But how can I solve this?

3

3 Answers

0
votes

In the URL you need to specify the full URL:

https://jbpatfssr005:8080/tfs
0
votes

According to your error info and screenshot.

Seems you are trying to install agent with version 2.1221

Just as the doc stated:

This error may indicate the server certificate you used on your TFS server is not trusted by the build machine. Make sure you install your self-signed ssl server certificate into the OS certificate store.

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/certificate?view=azure-devops-2019

If somehow you can't successfully install certificate into your machine's certificate store due to various reasons.

The agent version 2.125.0 or above has the ability to ignore SSL server certificate validation error.

You could try to install a build agent with higher version. The source of build agent, you could download here.

0
votes

My TFS is running on the following URL: https://jbpatfssr005. When I was installing it I tried to use jbpatfssr005/tfs but I got errors so I left it whithout the tfs. I read the documentation and I tried the following command in powershell:

PowerShell Invoke-WebRequest -Uri jbpatfssr005 -UseDefaultCredentials.

I got this result:

enter image description here

So I guess TFS installed the certificate correctly right? I'll try to install a newer agent. @PatrickLu-MSFT I'll report back the results.