As per docs from microsoft PAT can be used for az devops login as below
cat my_pat_token.txt | az devops login --organization https://dev.azure.com/contoso/
However, the same thing does not work when inside docker container
Here is my docker file
FROM mcr.microsoft.com/azure-cli:latest
RUN az config set extension.use_dynamic_install=yes_without_prompt
COPY my_pat_token.txt .
RUN cat my_pat_token.txt | az devops login --organization https://dev.azure.com/contoso/
I get below error message
WARNING: Unable to use secure credential store in this environment.
WARNING: Please refer to alternate methods at https://aka.ms/azure-devops-cli-auth