Reputation: 33
I tried to install local python dependencies with requirements.txt file
My requirements.txt
-e git+ssh://[email protected]_gitlab.com/my_group/my_project.git@master#egg=my_project
I got such error
WARNING: Discarding git+ssh://@ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project. Command errored out with exit status 128: git clone -q 'ssh://@ext.my_gitlab.com/my_grouo/my_project.git' 'c:\polygon\projects\test_project\venv\src\my-project'. ERROR: Could not fine a version that satisfies the requirement my-project (unavailable). ERORR: No matching distribution found for my-project (unavailable)
But then I install local dependencies with this command all dependencies install without any errors
pip install -U git+ssh://[email protected]_gitlab.com/my_group/my_project.git@master
How to fix this problem with installation with requirements.txt? I follow the instructions from https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers
Upvotes: 1
Views: 311
Reputation: 1329322
Check first if modifying your requirements.txt
to include the git@
user in the URL would work.
You say pip install -U git+ssh://[email protected]_gitlab.com/...
works.
Therefore, the requirements.txt
should also include:
git+ssh://[email protected]_gitlab.com/
^^^
The OP tibhar940 reports in the comments:
That was my fault - I tried
-e git+ssh://[email protected]_gitlab.com:my_group/my_project.git@master#egg=my_project
instead of
-e git+ssh://[email protected]_gitlab.com/my_group/my_project.git@master#egg=my_project
Upvotes: 1