how to not print the index url in generated requirements.txt when using piptools

Viewed 991

Hello I am using piptools to compile requirements.in to generate requirements.txt.

I also have some index url written in my .pip/pip.conf file which I store my credentials to our python artifactory repo. So whenever I do pip-compile requirements.in the generated requirements.txt will contain a line reflecting that index url such as the following. I don't want this line to be there, is there a configuration where we can configure pip-tools to not generate this line to requirements.txt?

--extra-index-url https://pli:credentials@mydomain.jfrog.io/api/pypi/pypi-virtual/simple

1 Answers

add the --no-emit-index-url flag to the pip-compile command, or --no-index for pre-5.2.0 versions.

Related