简体   繁体   中英

How to delete an orphaned Devops Service Connection?

In the Azure Devops GUI inside the project, I see 3 Devops Service connections: SC1 (ARM), SC2 (ARM) and SC3 (Nuget). If I try to delete SC1 (ARM), it immediately takes me back to the Service Connection screen and it is still there.

Another post suggested using the CLI to delete it and setting deep to false: https://learn.microsoft.com/en-us/cli/azure/devops/service-endpoint?view=azure-cli-latest#az-devops-service-endpoint-delete

But, in this instance the CLI doesn't even list SC1 (ARM) - it only shows SC2 (ARM) and SC3 (Nuget) when doing a "list" on it.

I have fixed this as follows:

  1. Click the orphaned Service Connection in the GUI.
  2. Note the URL, it'll have resourceId= followed by a GUID; make a note of this GUID.
  3. Now use that GUID to delete the orphaned service Connection using the CLI:
az devops service-endpoint delete --organization "My-Org" --project "My-Project" --id "GUID"

(substituting the correct values including the GUID from above).

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM