Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set up global config to point to private registry #9846

Closed
Levelleor opened this issue Nov 14, 2024 · 3 comments
Closed

Unable to set up global config to point to private registry #9846

Levelleor opened this issue Nov 14, 2024 · 3 comments
Labels
kind/bug Something isn't working as expected

Comments

@Levelleor
Copy link

Description

I am trying to set up a private PyPi registry which is on Nexus working globally with Poetry:

poetry config repositories.nexus https://master.example.net/repo/repository/PyPiGroup/simple
poetry config http-basic.nexus <username> <password>

This works when I use uv or PDM or with pip.conf but in Poetry it refuses to accept these and I see an error:

poetry add click
Using version ^8.1.7 for click

Updating dependencies
Resolving dependencies... (7.7s)

('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

I've also tried embedding credentials into the url like this:

poetry config repositories.nexus https://<username>:<password>@master.example.net/repo/repository/PyPiGroup/simple

But no luck with that either.

Workarounds

poetry source add nexus https://<username>:<password>@master.example.net/repo/repository/PyPiGroup/simple

This partially works, I am able to install packages with it but I am assuming this creates a local to the project config because I am unable to run some global commands like pulling poetry plugins with poetry self add ...

Poetry Installation Method

pipx

Operating System

RHEL9

Poetry Version

Poetry (version 1.8.4)

Poetry Configuration

cache-dir = "/home/myuser/.cache/pypoetry"
certificates.nexus.cert = "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
certificates.nexus-prod.cert = "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
repositories.nexus.url = "https://<username>:<password>@master.example.net/repo/repository/PyPiGroup/simple"
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/myuser/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true

Python Sysconfig

No response

Example pyproject.toml

No response

Poetry Runtime Logs

poetry remove click -vvv
Loading configuration file /home/myuser/.config/pypoetry/config.toml
Loading configuration file /home/myyser/.config/pypoetry/auth.toml
Using virtualenv: /userapps/repositories/poetry/.venv
Updating dependencies
Resolving dependencies...
   1: fact: poetry is 0.1.0
   1: derived: poetry
   1: fact: poetry depends on pendulum (^3.0.0)
   1: fact: poetry depends on pytest (^8.3.3)
   1: fact: poetry depends on poethepoet (^0.30.0)
   1: selecting poetry (0.1.0)
   1: derived: poethepoet (>=0.30.0,<0.31.0)
   1: derived: pytest (>=8.3.3,<9.0.0)
   1: derived: pendulum (>=3.0.0,<4.0.0)
   1: fact: poethepoet (0.30.0) depends on pastel (>=0.2.1,<0.3.0)
   1: fact: poethepoet (0.30.0) depends on pyyaml (>=6.0.2,<7.0.0)
   1: fact: poethepoet (0.30.0) depends on tomli (>=1.2.2)
   1: selecting poethepoet (0.30.0)
   1: derived: tomli (>=1.2.2)
   1: derived: pyyaml (>=6.0.2,<7.0.0)
   1: derived: pastel (>=0.2.1,<0.3.0)
   1: fact: pytest (8.3.3) depends on iniconfig (*)
   1: fact: pytest (8.3.3) depends on packaging (*)
   1: fact: pytest (8.3.3) depends on pluggy (>=1.5,<2)
   1: fact: pytest (8.3.3) depends on exceptiongroup (>=1.0.0rc8)
   1: fact: pytest (8.3.3) depends on tomli (>=1)
   1: fact: pytest (8.3.3) depends on colorama (*)
   1: selecting pytest (8.3.3)
   1: derived: colorama
   1: derived: exceptiongroup (>=1.0.0rc8)
   1: derived: pluggy (>=1.5,<2)
   1: derived: packaging
   1: derived: iniconfig
   1: fact: pendulum (3.0.0) depends on python-dateutil (>=2.6)
   1: fact: pendulum (3.0.0) depends on tzdata (>=2020.1)
   1: selecting pendulum (3.0.0)
   1: derived: tzdata (>=2020.1)
   1: derived: python-dateutil (>=2.6)
Source (PyPI): Getting info for pyyaml (6.0.2) from PyPI
Checking if keyring is available
[keyring:keyring.backend] Loading KWallet
[keyring:keyring.backend] Loading SecretService
[keyring:keyring.backend] Loading Windows
[keyring:keyring.backend] Loading chainer
[keyring:keyring.backend] Loading libsecret
[keyring:keyring.backend] Loading macOS
Backend 'fail Keyring' is not suitable
No valid keyring backend was found
Creating new session for pypi.org
Source (PyPI): No dependencies found, downloading metadata and/or archives
Creating new session for files.pythonhosted.org
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (1): files.pythonhosted.org:443
Retrying HTTP request in 0.5 seconds.
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (2): files.pythonhosted.org:443
Retrying HTTP request in 1.0 seconds.
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (3): files.pythonhosted.org:443
Retrying HTTP request in 1.5 seconds.
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (4): files.pythonhosted.org:443
Retrying HTTP request in 2.0 seconds.
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (5): files.pythonhosted.org:443
Retrying HTTP request in 2.5 seconds.
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (6): files.pythonhosted.org:443
   1: Version solving took 7.815 seconds.
   1: Tried 1 solutions.

  Stack trace:

  10  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:789 in urlopen
        787│ 
        788│             # Make the request on the HTTPConnection object
     →  789│             response = self._make_request(
        790│                 conn,
        791│                 method,

   9  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:490 in _make_request
        488│             ) and (conn and conn.proxy and not conn.has_connected_to_proxy):
        489│                 new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)
     →  490│             raise new_e
        491│ 
        492│         # conn.request() calls http.client.*.request, not the method in

   8  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:466 in _make_request
        464│             # Trigger any extra validation we need to do.
        465│             try:
     →  466│                 self._validate_conn(conn)
        467│             except (SocketTimeout, BaseSSLError) as e:
        468│                 self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)

   7  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:1095 in _validate_conn
       1093│         # Force connect early to allow us to validate the connection.
       1094│         if conn.is_closed:
     → 1095│             conn.connect()
       1096│ 
       1097│         # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791

   6  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connection.py:730 in connect
        728│             server_hostname_rm_dot = server_hostname.rstrip(".")
        729│ 
     →  730│             sock_and_verified = _ssl_wrap_socket_and_match_hostname(
        731│                 sock=sock,
        732│                 cert_reqs=self.cert_reqs,

   5  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connection.py:909 in _ssl_wrap_socket_and_match_hostname
        907│             server_hostname = normalized
        908│ 
     →  909│     ssl_sock = ssl_wrap_socket(
        910│         sock=sock,
        911│         keyfile=key_file,

   4  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/ssl_.py:469 in ssl_wrap_socket
       467│     context.set_alpn_protocols(ALPN_PROTOCOLS)
       468│ 
     → 469│     ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
       470│     return ssl_sock
       471│ 

   3  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/ssl_.py:513 in _ssl_wrap_socket_impl
       511│         return SSLTransport(sock, ssl_context, server_hostname)
       512│ 
     → 513│     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
       514│ 

   2  /usr/lib64/python3.9/ssl.py:501 in wrap_socket
        499│         # SSLSocket class handles server_hostname encoding before it calls
        500│         # ctx._wrap_socket()
     →  501│         return self.sslsocket_class._create(
        502│             sock=sock,
        503│             server_side=server_side,

   1  /usr/lib64/python3.9/ssl.py:1074 in _create
       1072│                         # non-blocking
       1073│                         raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
     → 1074│                     self.do_handshake()
       1075│             except (OSError, ValueError):
       1076│                 self.close()

  ConnectionResetError

  [Errno 104] Connection reset by peer

  at /usr/lib64/python3.9/ssl.py:1343 in do_handshake
      1339│         timeout = self.gettimeout()
      1340│         try:
      1341│             if timeout == 0.0 and block:
      1342│                 self.settimeout(None)
    → 1343│             self._sslobj.do_handshake()
      1344│         finally:
      1345│             self.settimeout(timeout)
      1346│ 
      1347│     def _real_connect(self, addr, connect_ex):

The following error occurred when trying to handle this error:


  Stack trace:

  14  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/requests/adapters.py:667 in send
       665│ 
       666│         try:
     → 667│             resp = conn.urlopen(
       668│                 method=request.method,
       669│                 url=url,

  13  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:843 in urlopen
        841│                 new_e = ProtocolError("Connection aborted.", new_e)
        842│ 
     →  843│             retries = retries.increment(
        844│                 method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
        845│             )

  12  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/retry.py:474 in increment
       472│             # Read retry?
       473│             if read is False or method is None or not self._is_method_retryable(method):
     → 474│                 raise reraise(type(error), error, _stacktrace)
       475│             elif read is not None:
       476│                 read -= 1

  11  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/util.py:38 in reraise
        36│     try:
        37│         if value.__traceback__ is not tb:
     →  38│             raise value.with_traceback(tb)
        39│         raise value
        40│     finally:

  10  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:789 in urlopen
        787│ 
        788│             # Make the request on the HTTPConnection object
     →  789│             response = self._make_request(
        790│                 conn,
        791│                 method,

   9  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:490 in _make_request
        488│             ) and (conn and conn.proxy and not conn.has_connected_to_proxy):
        489│                 new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)
     →  490│             raise new_e
        491│ 
        492│         # conn.request() calls http.client.*.request, not the method in

   8  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:466 in _make_request
        464│             # Trigger any extra validation we need to do.
        465│             try:
     →  466│                 self._validate_conn(conn)
        467│             except (SocketTimeout, BaseSSLError) as e:
        468│                 self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)

   7  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connectionpool.py:1095 in _validate_conn
       1093│         # Force connect early to allow us to validate the connection.
       1094│         if conn.is_closed:
     → 1095│             conn.connect()
       1096│ 
       1097│         # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791

   6  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connection.py:730 in connect
        728│             server_hostname_rm_dot = server_hostname.rstrip(".")
        729│ 
     →  730│             sock_and_verified = _ssl_wrap_socket_and_match_hostname(
        731│                 sock=sock,
        732│                 cert_reqs=self.cert_reqs,

   5  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/connection.py:909 in _ssl_wrap_socket_and_match_hostname
        907│             server_hostname = normalized
        908│ 
     →  909│     ssl_sock = ssl_wrap_socket(
        910│         sock=sock,
        911│         keyfile=key_file,

   4  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/ssl_.py:469 in ssl_wrap_socket
       467│     context.set_alpn_protocols(ALPN_PROTOCOLS)
       468│ 
     → 469│     ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
       470│     return ssl_sock
       471│ 

   3  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/urllib3/util/ssl_.py:513 in _ssl_wrap_socket_impl
       511│         return SSLTransport(sock, ssl_context, server_hostname)
       512│ 
     → 513│     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
       514│ 

   2  /usr/lib64/python3.9/ssl.py:501 in wrap_socket
        499│         # SSLSocket class handles server_hostname encoding before it calls
        500│         # ctx._wrap_socket()
     →  501│         return self.sslsocket_class._create(
        502│             sock=sock,
        503│             server_side=server_side,

   1  /usr/lib64/python3.9/ssl.py:1074 in _create
       1072│                         # non-blocking
       1073│                         raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
     → 1074│                     self.do_handshake()
       1075│             except (OSError, ValueError):
       1076│                 self.close()

  ProtocolError

  ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

  at /usr/lib64/python3.9/ssl.py:1343 in do_handshake
      1339│         timeout = self.gettimeout()
      1340│         try:
      1341│             if timeout == 0.0 and block:
      1342│                 self.settimeout(None)
    → 1343│             self._sslobj.do_handshake()
      1344│         finally:
      1345│             self.settimeout(timeout)
      1346│ 
      1347│     def _real_connect(self, addr, connect_ex):

The following error occurred when trying to handle this error:


  Stack trace:

  29  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/application.py:327 in run
       325│ 
       326│             try:
     → 327│                 exit_code = self._run(io)
       328│             except BrokenPipeError:
       329│                 # If we are piped to another process, it may close early and send a

  28  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/console/application.py:190 in _run
       188│         self._load_plugins(io)
       189│ 
     → 190│         exit_code: int = super()._run(io)
       191│         return exit_code
       192│ 

  27  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/application.py:431 in _run
       429│             io.input.interactive(interactive)
       430│ 
     → 431│         exit_code = self._run_command(command, io)
       432│         self._running_command = None
       433│ 

  26  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/application.py:473 in _run_command
       471│ 
       472│         if error is not None:
     → 473│             raise error
       474│ 
       475│         return terminate_event.exit_code

  25  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/application.py:457 in _run_command
       455│ 
       456│             if command_event.command_should_run():
     → 457│                 exit_code = command.run(io)
       458│             else:
       459│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  24  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/commands/base_command.py:117 in run
       115│         io.input.validate()
       116│ 
     → 117│         return self.execute(io) or 0
       118│ 
       119│     def merge_application_definition(self, merge_args: bool = True) -> None:

  23  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cleo/commands/command.py:61 in execute
        59│ 
        60│         try:
     →  61│             return self.handle()
        62│         except KeyboardInterrupt:
        63│             return 1

  22  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/console/commands/remove.py:117 in handle
       115│         self.installer.whitelist(removed_set)
       116│ 
     → 117│         status = self.installer.run()
       118│ 
       119│         if not self.option("dry-run") and status == 0:

  21  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/installation/installer.py:104 in run
       102│             self.verbose(True)
       103│ 
     → 104│         return self._do_install()
       105│ 
       106│     def dry_run(self, dry_run: bool = True) -> Installer:

  20  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/installation/installer.py:241 in _do_install
       239│                 source_root=self._env.path.joinpath("src")
       240│             ):
     → 241│                 ops = solver.solve(use_latest=self._whitelist).calculate_operations()
       242│         else:
       243│             self._io.write_line("Installing dependencies from lock file")

  19  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/puzzle/solver.py:71 in solve
        69│         with self._progress(), self._provider.use_latest_for(use_latest or []):
        70│             start = time.time()
     →  71│             packages, depths = self._solve()
        72│             end = time.time()
        73│ 

  18  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/puzzle/solver.py:154 in _solve
       152│ 
       153│         try:
     → 154│             result = resolve_version(self._package, self._provider)
       155│ 
       156│             packages = result.packages

  17  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/mixology/__init__.py:18 in resolve_version
        16│     solver = VersionSolver(root, provider)
        17│ 
     →  18│     return solver.solve()
        19│ 

  16  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/mixology/version_solver.py:175 in solve
       173│             while next is not None:
       174│                 self._propagate(next)
     → 175│                 next = self._choose_package_version()
       176│ 
       177│             return self._result()

  15  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
       512│             package = locked
       513│ 
     → 514│         package = self._provider.complete_package(package)
       515│ 
       516│         conflict = False

  14  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/puzzle/provider.py:489 in complete_package
       487│                 dependency_package = DependencyPackage(
       488│                     dependency,
     → 489│                     self._pool.package(
       490│                         package.pretty_name,
       491│                         package.version,

  13  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/repository_pool.py:204 in package
       202│         for repo in self.repositories:
       203│             try:
     → 204│                 return repo.package(name, version, extras=extras)
       205│             except PackageNotFound:
       206│                 continue

  12  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/cached_repository.py:75 in package
        73│         extras: list[str] | None = None,
        74│     ) -> Package:
     →  75│         return self.get_release_info(canonicalize_name(name), version).to_package(
        76│             name=name, extras=extras
        77│         )

  11  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/cached_repository.py:52 in get_release_info
        50│             return PackageInfo.load(self._get_release_info(name, version))
        51│ 
     →  52│         cached = self._release_cache.remember(
        53│             f"{name}:{version}", lambda: self._get_release_info(name, version)
        54│         )

  10  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/utils/cache.py:147 in remember
       145│         value = self.get(key)
       146│         if value is None:
     → 147│             value = callback() if callable(callback) else callback
       148│             self.put(key, value, minutes)
       149│         return value

   9  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/cached_repository.py:53 in <lambda>
        51│ 
        52│         cached = self._release_cache.remember(
     →  53│             f"{name}:{version}", lambda: self._get_release_info(name, version)
        54│         )
        55│ 

   8  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/pypi_repository.py:177 in _get_release_info
       175│             page = self.get_page(name)
       176│             links = list(page.links_for_version(name, version))
     → 177│             info = self._get_info_from_links(links)
       178│ 
       179│             data.requires_dist = info.requires_dist

   7  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/http_repository.py:324 in _get_info_from_links
       322│             if platform_specific_wheels:
       323│                 first_wheel = platform_specific_wheels[0]
     → 324│                 return self._get_info_from_metadata(
       325│                     first_wheel
       326│                 ) or self._get_info_from_wheel(first_wheel)

   6  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/repositories/http_repository.py:166 in _get_info_from_metadata
       164│             try:
       165│                 assert link.metadata_url is not None
     → 166│                 response = self.session.get(link.metadata_url)
       167│                 if link.metadata_hashes and (
       168│                     hash_name := get_highest_priority_hash_type(

   5  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/utils/authenticator.py:267 in get
       265│ 
       266│     def get(self, url: str, **kwargs: Any) -> requests.Response:
     → 267│         return self.request("get", url, **kwargs)
       268│ 
       269│     def head(self, url: str, **kwargs: Any) -> requests.Response:

   4  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/utils/authenticator.py:241 in request
       239│             except (requests.exceptions.ConnectionError, OSError) as e:
       240│                 if is_last_attempt:
     → 241│                     raise e
       242│             else:
       243│                 if resp.status_code not in STATUS_FORCELIST or is_last_attempt:

   3  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/poetry/utils/authenticator.py:238 in request
       236│             is_last_attempt = attempt >= 5
       237│             try:
     → 238│                 resp = session.send(prepared_request, **send_kwargs)
       239│             except (requests.exceptions.ConnectionError, OSError) as e:
       240│                 if is_last_attempt:

   2  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/requests/sessions.py:703 in send
       701│ 
       702│         # Send the request
     → 703│         r = adapter.send(request, **kwargs)
       704│ 
       705│         # Total elapsed time of the request (approximately)

   1  ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/cachecontrol/adapter.py:76 in send
        74│             request.headers.update(self.controller.conditional_headers(request))
        75│ 
     →  76│         resp = super().send(request, stream, timeout, verify, cert, proxies)
        77│ 
        78│         return resp

  ConnectionError

  ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

  at ~/.local/pipx/venvs/poetry/lib64/python3.9/site-packages/requests/adapters.py:682 in send
      678│                 chunked=chunked,
      679│             )
      680│ 
      681│         except (ProtocolError, OSError) as err:
    → 682│             raise ConnectionError(err, request=request)
      683│ 
      684│         except MaxRetryError as e:
      685│             if isinstance(e.reason, ConnectTimeoutError):
      686│                 # TODO: Remove this in 3.0.0: see #2811
@Levelleor Levelleor added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 14, 2024
@dimbleby
Copy link
Contributor

This all sounds as expected, please see the docs

@abn
Copy link
Member

abn commented Nov 15, 2024

@Levelleor the documentation in question is https://python-poetry.org/docs/repositories/#installing-from-private-package-sources

While it is not clear from you issue description, I am assuming you are attempting to add a global "package source" you can use for all projects.

While this is possible in other tools, Poetry does not support it. This is for a variety of reasons. For now you can do this per-project as described in the documentation. Or use a plugin as described in #5958.

poetry source add --priority=<priority> nexus https://master.example.net/repo/repository/PyPiGroup/simple
poetry config http-basic.nexus <username> <password>
poetry add --source nexus private-package

Closing this as a duplicate of #5958.

@abn abn closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@abn abn removed the status/triage This issue needs to be triaged label Nov 15, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants