In poetry I configured my registries with
poetry config http-basic.my-private-registry my-org $PAT
uv seems like using .netrc but I could not configure successefully.
I tried .netrc like this but I get 401 error
machine pkgs.dev.azure.com/my-org
login my-org
password <PAT>
401 Unauthorized
error typically means that the registry did not accept the credentials.
For Azure Artifacts or Azure DevOps registries, your .netrc
entry should look like below:
pkgs.dev.azure.com
(do not include the organization name here).When generating the PAT in Azure DevOps, Packaging (Read) for reading artifacts. add Packaging (Write) if you plan to push packages.
pyproject.toml
.[tool.poetry.source]
name = "my-private-registry"
url = "https://pkgs.dev.azure.com/my-org/_packaging/my-feed-name/pypi/simple/"
secondary = true
Verify the credentials work, use curl
to test.