How to add github repo as dependency in custom app

I have a github repo as dependency in custom app. I added it in requirements.txt as git+<https_repo_path>. This gives error when installing the app ./env/bin/pip install -q -U -e apps/custom_app.

'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'+https:/'"

But It installs the dependency when I run the below command in bench directory without any change to requirements file.

./env/bin/pip install -r apps/custom_app/requirements.txt