0

I have installed Azure DevOps agent on my laptop and am trying to configure it. It does connect to the Azure server, and I see it on the server appearing in the list of agents, but then config.cmd fails with error VS30063:

PS C:\agent> ./config.cmd

>> Connect:

Enter server URL > https://myazuredevops.com
Enter authentication type (press enter for PAT) >
Enter personal access token > ****************************************************
Connecting to server ...

>> Register Agent:

Enter agent pool (press enter for default) >
Enter agent name (press enter for WINDOWS-NKCBPLC) >
Scanning for tool capabilities.
Connecting to the server.
Enter replace? (Y/N) (press enter for N) > y
Successfully replaced the agent
Testing agent connection.
VS30063: You are not authorized to access  https://myazuredevops.com.

The log file contains the following lines:

......
[2020-08-26 10:56:13Z INFO ConfigurationManager] Agent server url resolve by  server: 'https://myazuredevops.com/'.
[2020-08-26 10:56:13Z INFO ConfigurationStore] Saving OAuth credential @ C:\agent\.credentials
[2020-08-26 10:56:13Z INFO ConfigurationStore] Credentials Saved.
[2020-08-26 10:56:14Z INFO Terminal] WRITE LINE: Testing agent connection.
[2020-08-26 10:56:14Z INFO ConfigurationStore] HasCredentials()
[2020-08-26 10:56:14Z INFO ConfigurationStore] stored True
[2020-08-26 10:56:14Z INFO CredentialManager] GetCredentialProvider
[2020-08-26 10:56:14Z INFO CredentialManager] Creating type OAuth
[2020-08-26 10:56:14Z INFO CredentialManager] Creating credential type: OAuth
[2020-08-26 10:56:14Z INFO RSAEncryptedFileKeyManager] Loading RSA key parameters from file C:\agent\.credentials_rsaparams
[2020-08-26 10:56:14Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2020-08-26 10:56:14Z WARN VisualStudioServices] Authentication failed with status code 401.
.....

Sep 21, 2020

Tried to install and configure an agent on an Ubuntu server located on the Azure cloud. Got the same error.

Alex Karnovsky
  • 310
  • 2
  • 15

1 Answers1

1

1.Make sure your Azure Devops account has the permission to manage the agents in current Org.

2.Then create a new PAT with Read & manage permission.

enter image description here

3.Run the config.cmd again, and enter a new Name at this step:

enter image description here

4.If the issue persists, you can create a new agent pool and register the agent there to check if it helps:

enter image description here

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • 1
    I have done all your suggested steps: 1. I checked that my account is a member of Project Collection Administrators group (I haven't found a specific permission to manage the agents). 2. Created a new token with scope Agent Pools (read, manage). 3. Created a new agent pool, 4. Ran config.cmd with a new agent name. Alas, the same problem. – Alex Karnovsky Aug 27 '20 at 16:57
  • @AlexKarnovsky In step4, please download a new agent zip file and run the new config.cmd file. And how about your Internet, do you set the proxy? – LoLance Aug 31 '20 at 07:43
  • @LanceLiMSFT I have downloaded the new agent and run the new config.cmd file. Same problem. As to the proxy, AFAIU there is no proxy. The server is on the Azure cloud, while the agent is a laptop on the home network. – Alex Karnovsky Sep 07 '20 at 09:42