Tuesday 16 August 2022

Create Service Connection in Azure DevOps for Azure Container Registry - Using Basic Authentication

Adding Azure Container Registry (ACR) service connection to Azure DevOps  is really simple as described in "Create Service Connection in Azure DevOps for Azure Container Registry", when you have the same account you are using for Azure DevOps, is associated with your Azure Subscription. However, this may not be the case always and you may want to push docker images to ACR in an Azure Subscription which is not related to your Azure DevOps organization, such as your customer's production Azure subscription. Let’s see how to create a service connection for ACR in such situation to utilize it in a deployment pipeline using basic authentication.

Log on to the required Azure subscription and go to ACR Acces keys tab. You can find user name and password there. If you do not have acccess to this subscription, you can ask subscription owner or a user who have access to provide this information to you.


Then you need the URL to the ACR. You can copy it from the overview page of the ACR.



With this information you can create a Docker Registry service connection in your Azure DevOps Team project with information provided as below. Instead of Azure Contianer Registry option used earlier as explained in "Create Service Connection in Azure DevOps for Azure Container Registry", now you need to use the Other option. Use the copied ACR login server name with https:// for the Docker registry. For Docker ID you use the copied username from ACR and for Docker Password use the password copied form ACR. Provide a name for the service connection and make sure to allow access to all pipelines. Then you can use the ACR service connection to push images to ACR using your pipelines.




No comments:

Popular Posts