Use .netrc with pip and gitlab pypi

Viewed 1207

We have a gitlab pypi repository and a package that can be installed with the following command

pip install mypackage \
    --extra-index-url https://__token__:z-u5aFNdakdlsN@gitlab.com/api/v4/projects/12345678/packages/pypi/simple

I try to follow the following answer link to setup the password in ~/.netrc.

My ~/.netrc file

machine gitlab.com
    login __token__
    password z-u5aFNdakdlsN

And try to install with

pip install mypackage \
    --extra-index-url https://gitlab.com/api/v4/projects/12345678/packages/pypi/simple

Still, pip continue to ask for login and password

Am I missing something ?

0 Answers
Related