title: Poetry: Add new pipy private source to poetry sources with poetry.config
body: <p>I have a Python project that uses Poetry for dependency management.<br />
  I want to install a Python module from a private registry.<br />
  I know I can add it to the <code>pyproject.toml</code> file in a given source like this:</p>
  <pre><code>[[tool.poetry.source]]
  name = &quot;private-pipy-registry&quot;
  url = &quot;https://my-private-pipy-registry&quot;
  </code></pre>
  <p>but this registry url differs whether my project is run in review or production. I could add both review and production sources to the <code>.toml</code> file but this is not a suitable solution either.<br />
  I tried to use the poetry.config command line to add a private source.<br />
  This works when I want to publish this Python package to a private registry:</p>
  <pre><code>poetry config repositories.my-repo &quot;https://my-url/my-pypi/simple&quot;
  peotry publish --repository my-repo --build -u my-username -p my-password
  </code></pre>
  <p>but does not work when I want to install a dependency from a private registry as I first described:</p>
  <pre><code>poetry config repositories.my-repo &quot;https://my-url/my-pypi/simple&quot;
  poetry config http-basic.repo my-username my-password
  poetry update
  </code></pre>
  <p>It returns: <code>Because my-new-lib depends on my-private-lib (0.1.2) which doesn’t match any versions, version solving failed.</code><br />
  Do you know if I am missing something, if it is a known issue and if there is any solution? Thanks.</p>
  <p><strong>EDIT: I solved it by unsetting any repositories that were listed in poetry config --list, running poetry config repositories.my-repo --unset and resetting these repositories config</strong></p>