Following are steps followed to setup the self hosted agent.
./config.cmd
Now the agent is ready to be used for release pipeline deployments. Now I want to remove the agent so I run .\config remove
. It asks me for the PAT which I don't remember.
I don't have access to the azure devops anymore (so cannot generate new PAT). My goal (ad this question) is regarding removal of the agent service from the machine. Whether or not it removes the agent from the azure devops is irrelevant. Any advise?
Maybe it is sufficient to just delete the C:\agent
folder after the above command error?
I will leave formal answer, just in case.
In your case, you do not have access to Azure DevOps longer and you are not able to generate or re-generate PAT token. No problem, it is not big issue, the agent software is a connection between your (a) Server and (b) Azure DevOps. So if you do not have access to Azure DevOps, you can not do any thing about it. What you need to focus on, is uninstalling the agent software from (a) Server so it is no longer connected to (b) Azure DevOps.
Normally to remove agent, just use .\config remove
as you already have done in our question, and ignore server errors, the only reason server requires PAT again, is to allow removing the agent from Azure DevOps remotely, hence you do not have access Azure DevOps longer, just ignore the messages, it will removing the files. Delete the folder and that is it.
In case you get troubling or fail removing files using .\config remove
, than you have to do manual removal. You have 2 options below:
sc delete [service name]
.When one of the options is done. delete your agent folder. Now your Server is not longer connected to Azure DevOps. And you can use it for another Azure DevOps agent installation.
Reference:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.