Commit 9c816b83 by Sébastien Eustace

Fix an error when installing from a private repository

parent 2cf5ee1c
# Change Log # Change Log
## [Unreleased]
### Fixed
- Fixed an error when installing from private repositories.
## [0.12.1] - 2018-10-17 ## [0.12.1] - 2018-10-17
### Fixed ### Fixed
......
...@@ -3,6 +3,7 @@ import tempfile ...@@ -3,6 +3,7 @@ import tempfile
from subprocess import CalledProcessError from subprocess import CalledProcessError
from poetry.config import Config
from poetry.utils.helpers import get_http_basic_auth from poetry.utils.helpers import get_http_basic_auth
...@@ -45,7 +46,9 @@ class PipInstaller(BaseInstaller): ...@@ -45,7 +46,9 @@ class PipInstaller(BaseInstaller):
) )
args += ["--trusted-host", parsed.hostname] args += ["--trusted-host", parsed.hostname]
auth = get_http_basic_auth(package.source_reference) auth = get_http_basic_auth(
Config.create("auth.toml"), package.source_reference
)
if auth: if auth:
index_url = "{scheme}://{username}:{password}@{netloc}{path}".format( index_url = "{scheme}://{username}:{password}@{netloc}{path}".format(
scheme=parsed.scheme, scheme=parsed.scheme,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment