4

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 ?

phi
  • 10,572
  • 3
  • 21
  • 30
  • 1
    I am assuming that isn't your password, so keep in mind that passwords in `.netrc` file should not contain spaces, since the `.netrc` file is parsed against spaces, tabs and new-lines. – dejanualex Jan 28 '21 at 08:20
  • Thx @dejdej. There is non space / tabs /new-line in the password. I made sure that the fake password in the question has the same format as the real one. – phi Jan 28 '21 at 10:43
  • Remove what's before '@' in your pip.conf index-url (including the @) `--extra-index-url https://gitlab.com/api/v4/projects/12345678/packages/pypi/simple` – Lapsusone Apr 22 '21 at 14:53
  • @phi did you succeed to resolve this please? Thanks a lot – vel Jun 14 '22 at 11:30

0 Answers0