0
votes

UPDATE: I think this question was based on a fundamental misunderstanding. When creating the build pipeline definition, I would pick the saved service connection ("GitHub-iQmetrixService" in the screenshot), and then later Azure DevOps would continue to prompt for access to my personal account. This made me think that the build pipeline was linked to my personal account somehow, such that if my account is ever in the future gone or otherwise unable to access the repository, the build pipeline would stop working.

As far as I now understand, this is not the case. The build pipeline definition itself is in fact associated with the service connection, and the reason that Azure DevOps prompts for my personal login is because the integrated YAML editor is going to want to make commits back to the repo, and those commits need to happen "as me". When co-workers go to the pipeline editor, they too are prompted for their personal login.

I'm still a little bit nervous about this understanding, because I can't see anything in the UI that shows what service connection Azure DevOps is using primarily to process the build pipeline, nor can I see any way to change it should that ever be necessary.


When creating a new Build Pipeline, if I tell Azure DevOps that my repository is in GitHub, I am immediately redirected to GitHub to authorize access to my personal GitHub account (to which I have an ambient login). If I instead pick "Other Git", then the next step in the flow lets me say that the source is GitHub, at which point the screen says:

enter image description here

This authorization, set up by someone else in my organization, works just fine, and I can view all of the organization's repositories and set up a new pipeline. But then, if I close the window and try to re-open the pipeline editor, I am immediately redirected once again to the GitHub page to authorize access to my personal account. Editing the pipeline created based on the "GitHub-iQmetrixService" connection does not use the connection and instead wants to establish a new connection based on whatever individual accounts I have access to.

enter image description here

How can I edit the pipeline without creating a connection to the repository that is linked to my own personal account?

2
Just wanted to check in what the status on this issue was? Does session and cookie which I suggested can help you avoid the authorized manually now?Merlin Liang - MSFT

2 Answers

0
votes

As work around, you can take advantage of the browser sessions and cookies.

Configure the browser to let it retain and keep the session. And do not clear the session and cookie data once you close the browser.

For me, I am using Edge. So, I go Settings -> Privacy and Security -> Choose what to clear, then disable the option

enter image description here

After configure this, I do not need input my account, password and Verification code again while I close the windows, re-open and re-edit the pipeline,


If you want to make some configuration changes on this pipeline, please go right corner-> three dots, and choose the Triggers.

After located to the Triggers page, please change to YAML tab.

enter image description here

Then you can do the modified on this pipeline

0
votes

To provide some clarity, it appears what's going on here is that for YAML build definitions, Azure DevOps doesn't actually go to the build pipeline definition editor when you select "Edit". The YAML text editor it takes you to is in place of the build pipeline definition editor. But, the definition editor can still be reached. @Merlin Liang - MSFT's answer provides (after the horizontal rule) the steps to take to do this. I didn't understand why those steps, though. I created the following graphic to explain specifically the aspect that wasn't clear in my head:

Comparative flowchart