I am creating a docker image for my python code.
To install dependencies and requirements, I have
pip3 install git+https://[email protected]/<PATH_TO_REPO>@dev --no-cache-dir --force-reinstall
in the Dockerfile. when I run docker build command, I get below error
Running command git clone --filter=blob:none --quiet 'https://****@github.com/<PATH_TO_REPO>.git' /tmp/pip-req-build-cxx5g22f
fatal: could not read Password for 'https://***@github.com': No such device or address
error: subprocess-exited-with-error
I am running docker build using GitHub action and passing the GITHUB_PERSONAL_ACCESS_TOKEN
in build argument.
Please help
2
Answers
This worked ->
pip3 install git+https://oauth2:[email protected]/<PATH_TO_REPO>@dev --no-cache-dir --force-reinstall
If it is a "Personal Access Token" (PAT) and not an OAuth-Token, you have to specify your user name e.g.
Replace
username
with your GitHub username the PAT belongs to.