У меня есть пакет, назовем его pbd, в котором есть файл require.txt:
Код: Выделить всё
fastapi[standard]==0.115.2
python-dotenv~=1.0.1
tagger @ git+https://${PAT_TOKEN}@github.com/MY_ORGANIZATION/[email protected]
Код: Выделить всё
jsonpickle~=4.0.1
requests~=2.32.3
joblib~=1.4.2
tex @ git+https://${PAT_TOKEN}@github.com/MY_ORGANIZATION/[email protected]
Хорошо, я уже сгенерировал свой токен PAT, экспортировал его в переменную ENV, поместил в секреты всех моих репозиториев и т. д.
Если я попытаюсь установить tagger, все работает нормально, и я не получаю никаких ошибок. Проблема возникает, когда я пытаюсь установить пакет pbd. Когда я выполняю pip install -r require.txt с файлом pbd require.txt, он правильно разрешает пакет tagger, но происходит сбой при внедрении ${PAT_TOKEN. > для внутренней зависимости тегера (пакет tex).
Вот вывод pip install -r require.txt для пакет pbd:
Код: Выделить всё
...
Collecting tagger@ git+https://****@github.com/MY_ORGANIZATION/[email protected] (from -r requirements.txt (line 3))
Cloning https://****@github.com/MY_ORGANIZATION/tagger (to revision v1.0.1) to /tmp/pip-install-l1b_8yth/tagger_afff0d9438154e0bbd86cc84bd9a6408
Running command git clone --filter=blob:none --quiet 'https://****@github.com/MY_ORGANIZATION/tagger' /tmp/pip-install-l1b_8yth/tagger_afff0d9438154e0bbd86cc84bd9a6408
Resolved https://****@github.com/MY_ORGANIZATION/tagger to commit 04060492b1907ca817366f20be6a87a32680bf04
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
...
Collecting tex@ git+https://****@github.com/MY_ORGANIZATION/[email protected] (from tagger@ git+https://***@github.com/MY_ORGANIZATION/[email protected]>-r requirements.txt (line 3))
Cloning https://****@github.com/MY_ORGANIZATION/tex (to revision v1.0.2) to /tmp/pip-install-l1b_8yth/tex_66e1729f35a1430fa58d589084f2aacd
Running command git clone --filter=blob:none --quiet 'https://****@github.com/MY_ORGANIZATION/tex' /tmp/pip-install-l1b_8yth/tex_66e1729f35a1430fa58d589084f2aacd
fatal: could not read Password for 'https://${PAT_TOKEN}@github.com': No such device or address
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet 'https://****@github.com/MY_ORGANIZATION/tex' /tmp/pip-install-l1b_8yth/tex_66e1729f35a1430fa58d589084f2aacd did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Спасибо.
Подробнее здесь: https://stackoverflow.com/questions/793 ... her-privat