Azure DevOps Pipelines failing: Initialize containers: Docker login fail with exit code 1

Copper Contributor

Hello,

 

Are pipelines are failing now...

 

Starting: Initialize containers
/usr/bin/docker version --format '{{.Server.APIVersion}}'
'1.41'
Docker daemon API version: '1.41'
/usr/bin/docker version --format '{{.Client.APIVersion}}'
'1.41'
Docker client API version: '1.41'
/usr/bin/docker ps --all --quiet --no-trunc --filter "label=f4ce27"
/usr/bin/docker network prune --force --filter "label=f4ce27"
/usr/bin/docker login --username "***" --password-stdin https://***
Error response from daemon: Get "https://***/v2/": unauthorized: Invalid clientid or client secret.
##[error]Docker login fail with exit code 1
Finishing: Initialize containers
4 Replies
seems our (2 year old) service connection to ACR was broke
created a new one
we're back up

Hey,

We had the same issue, but since we didn't want to recreate the Service Connection (SC), it's shared across a large number of projects, we did the following;
- Find out the name of your Service Principal (check your ACR roles for something like [ORGANIZATION]-[PROJECT]
- Go to the SP, create a new secret and remove the old one.

- Edit and save the SC.
- Restart the agents.

One of the last 2 steps is required (not sure which one) since the credentials are stored somewhere, simply creating a new secret was not enough for us.

Hope this helps the next person