Blog Post

Azure DevOps–Reconfiguring an Agent

,

This post looks at how to re-configure a local Azure DevOps agent when you need to change to a new pool or organization.

PAT Expired

I got a note that one of my personal access tokens (PAT) had expired, and I wanted to update the agent. I ran config, but saw this, I need to remove the config first.

However, when I ran “config remove”, which is how you can reconfigure an agent, I got this:

2020-10-12 10_04_34-cmd

In the image, the agent config asks for the PAT to allow it to authenticate to be removed. Since the agent doesn’t store this, and I don’t have it anymore, I can’t enter this. I can remove the agent from the portal, but there’s an easier way.

The Local Config

If you show hidden files, and if you are in tech, you always ought to do this, you will see a few in the agent folder. I name mine Agent, and inside, you can see there are .agent, .credentials, and .credentials_rsaparams files.

2020-10-12 10_17_22-agent

If I remove these three files, the agent doesn’t know where or how to connect. I can then run the config and re-set up the agent.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating