Search code examples
azure-devopsazure-pipelines-release-pipelineagentrelease-managementazure-devops-deploymentgroups

Server time error during the installation of deployment group agent via powershell


I am trying to install a deployment agent on the destination machine.

I am running the script given by Azure DevOps in the deployment group.

The agent installs successfully but then I get the error saying:

The bearer <secret removed> is not valid until {date here} 8:06:23 PM. Current server time is {same date here} 7:59:53 PM.

The server time is actually ahead (not behind) 6 minutes than my local machine. Anyway why would it matter?

And most importantly what I can do about this error? How to fix it?

Because at the end it prevents the agent from running.

Thanks


Solution

  • According to the error message, seems the system clock is not accurate on the agent server.

    So, please update the system clock to the correct time and then try it again to check if that works.