Use .netrc with pip and gitlab pypi

2.3k Views Asked by At

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__:[email protected]/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

There are 0 best solutions below