Coder.comC
Coder.com3y ago
30 replies
Elio

Agent Authentication Error

Getting the following with one of my templates that starts a session on a remote server. The token exists in the instance and the init script runs the install stuff fine but for some reason it doesn't authenticate. I'm not really sure what the workspace provision job is and how it would factor in.
2023-06-28 22:23:42.916 [warn]  run exited with error ...
    error= fetch metadata:
               github.com/coder/coder/agent.(*agent).run
                   /home/runner/actions-runner/_work/coder/coder/agent/agent.go:493
             - GET https://<manually redacted>/api/v2/workspaceagents/me/manifest: unexpected status code 401: Workspace agent not authorized.: Try logging in using 'coder login <url>'.
               Error: The agent cannot authenticate until the workspace provision job has been completed. If the job is no longer running, this agent is invalid.
Was this page helpful?