microsoft/artifacts-keyring

Struggling with authentication through personal access token (PAT)

fralik opened this issue · 1 comments

I am trying to consume artifacts when building Docker locally, i.e. there are no Azure pipelines involved. And I just can't make it work. If I go the official documentation way and use an extra index url from my feed, then I can install packages after I authenticate through browser. However, if I build a docker image, then I can't use browser.
I tried to use PAT inside index url, but this just doesn't work or I do it wrongly. I've just read that PAT can't be used with corporate accounts. Could it be the case? My feed URL is like this:

https://<organization>.pkgs.visualstudio.com/<guid>/_packaging/<feed>/pypi/simple/

Whenever I try to make this url like

https://<username>:<token>@<organization>.pkgs.visualstudio.com/<guid>/_packaging/<feed>/pypi/simple/

I am asked for a username and password.

As a side note I do not really know what to use as my username, as my account is part of the organization and it's seems like the username is firstname.lastname@company.com, i.e. with @ symbol in it.

I think I resolved the issue. I had to create PAT for all accessible organizations. Then the index url works. Just for the record - my account is part of only one organization.