microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.72k stars 867 forks source link

Cannot queue builds, edit the pipeline after updating the GH service connection #2016

Closed kittaakos closed 5 years ago

kittaakos commented 5 years ago

I had a service connection for GH with:

I had a fully functional build pipeline:

With the new service connection, I can create new build pipelines (access the GH repositories) but I cannot do anything with my existing build pipeline which was created with the deleted connection. I cannot queue builds, editing the pipeline throws an error.

When I try to edit the pipeline from Azure DevOps, I have the following error:

An error occurred attempting to fetch the YAML file 'azure-pipelines.yml' for the repository default branch and latest build branches: master. Error on last attempt: Service connection uuid1 not found in the project uuid2.

When I try to queue a build from the master, I have the following:

Unable to resolve the reference 'refs/heads/master' to a specific version. Verify the reference exists in the source repository

I guess my existing build pipeline is somehow still bound to the old service connection. Is this a correct assumption? If yes, how can I sync it and link to the new one? If no, what could be the problem? Did I completely mess up some OAuth or role thing or is it something not yet fully supported on your side?

Thank you!

TingluoHuang commented 5 years ago

@kittaakos you should be able to switch connection in the UI. image

kittaakos commented 5 years ago

It works perfectly, thank you!

luyseyal commented 5 years ago

If OAuth times out, you need to delete the service connection and then you will be able to access this screen when you go to edit the YAML file