Get-VSTeamGitRepository doesn't seem to work properly from an ADO pipeline #560
Replies: 1 comment
-
I wanted to let you know I found the answer. The problem was in the job authorization scope of the release. I went into the project settings -> pipelines -> settings. In there, there is a setting called 'Protect access to repositories in YAML pipelines' that was enabled. This generates a job access token (the system token I use in the set-vsteamsaccount) that is scoped to the repo the release runs from. I disabled it, and then it ran fine! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a yaml pipeline in a repo, which calls a powershell script where I use VSTeams. One of the scripts I run is this:
When I run this, I get the name of the repo I'm releasing from. However, When I try to get [1] or [2], it's empty. If I print the result of Get-VSTeamGitRepository directly, I only have one object.
When I try to get another repo by name, I get the error that a repo by that name doesn't exist.
I wonder if the issue could be that the release agent somehow only sees the repository it's releasing from? Or did I make a mistake in reading the vsteam.repository object?
Beta Was this translation helpful? Give feedback.
All reactions