0

I am trying to implement the powershell code that is mentioned in the answer to the following question. Triggering Azure DevOps builds based on changes to sub folders

My simple attempt to access DevOps results in the following error. enter image description here

This is the simple powershell code I am trying first. It is the code that caused the error depicted above.

tf changeset /collection:"https://*******.visualstudio.com/******************" 25490

enter image description here

Jared
  • 175
  • 1
  • 13

1 Answers1

0

Trouble Getting Changeset Details With Powershell From Within CI Build

I could reproduce this issue with error URL in parameter /collection:TeamProjectCollectionUrl or do not have permission to access the corresponding collection.

To resolve this issue, first, we nee make sure the URL is correct. The URL should be the Team Project Collection:

tf changeset /collection:http://***.visualstudio.com/YourCollectionName

Second, if you do not have permission to access that collection, please add a PAT, which have permission to access that collection to the URL:

tf changeset /collection:http://<YouPATHere>@***.visualstudio.com/YourCollectionName

As test, it works fine on my side:

tf changeset /collection:http://<PAT>@.visualstudio.com/DefaultCollection 138

enter image description here

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135