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

poetry fails with pypi.org certificate when I have multiple repositories #2839

Closed
kalfa opened this issue Aug 21, 2020 · 9 comments
Closed
Labels
area/repo Meta-issues for the repository/forge itself kind/bug Something isn't working as expected

Comments

@kalfa
Copy link

kalfa commented Aug 21, 2020

  • [x ] I am on the latest Poetry version.

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

  • [x ] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Linux Centos 7 kernel 3.10.0-1062.4.1.el7.x86_64 python 3.6.7, also OSX 10.14.6 with brewed python 3.6.5

  • Poetry version: 1.0.10

poetry seems to be unable to contact pypi.org when I use a private repository.

My certificate is self-signed. It uses basic http auth which for this example I added to the config.

Note: I redacted my repository URL, package name and authors data (email).

Steps
pyproject.toml generated with poetry init and no deps/dev-deps:

[tool.poetry]
name = "my-poetry-package"
version = "0.0.1"
description = ""
authors = ["ME"]

[[tool.poetry.source]]
name = "my_internal_repo"
url = "https://pypi.PRIVATE.TLD/simple/"

[tool.poetry.dependencies]
python = "^3.6"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

then add the repository credentials and certificate (it is self-signed) for my internal repo

poetry config repositories.my_internal_repo https://pypi.PRIVATE.TLD/simple
poetry config certificates.my_internal_repo.cert $HOME/my-chain.pem
poetry config http-basic.my_internal_repo USER PASS

Then add the first depedency. my-package depends only on packages on pypi.org (as the logs shows):

$ poetry add -vvv my-package
Using virtualenv: /users/kalfa/Sources/gitlab-ci/.venv
/users/kalfa/.local/lib/python3.6/site-packages/urllib3/connection.py:388: SubjectAltNameWarning: Certificate for pypi.PRIVATE.TLD has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https:/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
Using version ^0.0.92 for my-package

Updating dependencies
Resolving dependencies...
   1: fact: my-poetry-package is 0.0.1
   1: derived: my-poetry-package
   1: fact: my-poetry-package depends on my-package (^0.0.92)
   1: selecting my-poetry-package (0.0.1)
   1: derived: my-package (^0.0.92)
PyPI: No packages found for my-package >=0.0.92,<0.0.93
my_internal_repo: 1 packages found for my-package >=0.0.92,<0.0.93
PyPI: Getting info for my-package (0.0.92) from PyPI
   1: fact: my-package (0.0.92) depends on typing (*)
   1: fact: my-package (0.0.92) depends on numpy (*)
   1: fact: my-package (0.0.92) depends on dataclasses (*)
   1: selecting my-package (0.0.92)
   1: derived: dataclasses (*)
   1: derived: numpy (*)
   1: derived: typing (*)
PyPI: No release information found for numpy-0.9.6, skipping
PyPI: No release information found for numpy-0.9.8, skipping
PyPI: No release information found for numpy-1.0.3, skipping
PyPI: No release information found for numpy-1.0.4, skipping
PyPI: No release information found for numpy-1.0b1, skipping
PyPI: No release information found for numpy-1.0b4, skipping
PyPI: No release information found for numpy-1.0b5, skipping
PyPI: No release information found for numpy-1.0rc1, skipping
PyPI: No release information found for numpy-1.0rc2, skipping
PyPI: No release information found for numpy-1.0rc3, skipping
PyPI: No release information found for numpy-1.1.1, skipping
PyPI: No release information found for numpy-1.2.0, skipping
PyPI: No release information found for numpy-1.2.1, skipping
PyPI: No release information found for numpy-1.4.0, skipping
PyPI: 65 packages found for numpy *
   1: Version solving took 1.055 seconds.
   1: Tried 1 solutions.

[SSLError]
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/dataclasses/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)'),))

Traceback (most recent call last):
  File "/users/kalfa/.local/lib/python3.6/site-packages/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/users/kalfa/.local/lib/python3.6/site-packages/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/users/kalfa/.local/lib/python3.6/site-packages/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/users/kalfa/.local/lib/python3.6/site-packages/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/console/commands/add.py", line 156, in handle
    status = installer.run()
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/installation/installer.py", line 161, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/puzzle/solver.py", line 36, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/puzzle/solver.py", line 181, in _solve
    self._package, self._provider, locked=locked, use_latest=use_latest
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/mixology/__init__.py", line 7, in resolve_version
    return solver.solve()
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/mixology/version_solver.py", line 80, in solve
    next = self._choose_package_version()
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/mixology/version_solver.py", line 360, in _choose_package_version
    dependency = min(*unsatisfied, key=_get_min)
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/mixology/version_solver.py", line 353, in _get_min
    return len(self._provider.search_for(dependency))
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/puzzle/provider.py", line 146, in search_for
    repository=dependency.source_name,
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/repositories/pool.py", line 149, in find_packages
    name, constraint, extras=extras, allow_prereleases=allow_prereleases
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/repositories/legacy_repository.py", line 256, in find_packages
    page = self._get('/{}/'.format(canonicalize_name(name).replace('.', '-')))
  File "/users/kalfa/.local/lib/python3.6/site-packages/poetry/repositories/legacy_repository.py", line 425, in _get
    response = self._session.get(url)
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 665, in send
    history = [resp for resp in gen]
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 665, in <listcomp>
    history = [resp for resp in gen]
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 245, in resolve_redirects
    **adapter_kwargs
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/users/kalfa/.local/lib/python3.6/site-packages/cachecontrol/adapter.py", line 53, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/users/kalfa/.local/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)

If I try to add a pypi.org package direclty, it gives the same result

$ poetry add dataclasses
/users/kalfa/.local/lib/python3.6/site-packages/urllib3/connection.py:388: SubjectAltNameWarning: Certificate for pypi.PRIVATE.TLD has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https:/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning

[SSLError]
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/dataclasses/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)'),))

Variations
I tried with and without /simple in my-repository URL.
Failed for other reasons, but that's not the issue.

I tried using secondary=true in pyproject.toml for my repository
Same problem

I tried using default=true in pyproject.toml for my repository
I expected it to not try to contact pypi.org at all, but actually failed with the same exact issue, against pypi.org certificate.

I tried to remove the repository block from pyproject.toml and install
poetry add dataclasses

This can access pypi normally.

I tried to download the chain certs for pypi.org and add them to poetry for "PyPI".
Same result

What happened
poetry finds my-package in my private repository, but then fails when looking up deps on pypi.org, with

[SSLError]
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/dataclasses/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)'),))

like it is trying to use the wrong certificate

Expected results

Finds packges on my private repositories and its deps on pypi.org without certificate problems.

@kalfa kalfa added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 21, 2020
@finswimmer finswimmer added the area/repo Meta-issues for the repository/forge itself label Aug 24, 2020
@nylocx
Copy link

nylocx commented May 6, 2021

This happens for me too see also #4016 and this, maybe related, commit a3c5cf7

@kalfa
Copy link
Author

kalfa commented May 6, 2021

@nylocx I'll check it out if the bug is still standing with the latest version which includes the commit, thanks!

@nylocx
Copy link

nylocx commented May 6, 2021

@kalfa I just rechecked with an install of master:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - --git https:/python-poetry/poetry.git@master

But I still see errors about self signed certificates even after trying all combinations of

export REQUESTS_CA_BUNDLE=<self-signed-cert-downloaded-directly-from-browser|concatenated with certifi pem>
poetry config certificates.myrepo.cert <self-signed-cert-downloaded-directly-from-browser|concatenated with certifi pem>

But even with all packages in the requirements coming from pypi as soon as I add

[[tool.poetry.source]]
name = "myrepo"
url = "https://my.repo.tld/simple"
secondary = true
Loading configuration file /home/agoertz/.config/pypoetry/config.toml
Loading configuration file /home/agoertz/.config/pypoetry/auth.toml
Adding repository myrepo (https://my.repo.tld/simple) and setting it as secondary
Using virtualenv: /home/agoertz/.cache/pypoetry/virtualenvs/my-project-bPrSY5iN-py3.9
Updating dependencies
Resolving dependencies...
   1: fact: my-project is 0.1.0
   1: derived: my-project
   1: fact: my-project depends on bson (^0.5.10)
   1: fact: my-project depends on redis (^3.5.3)
   1: fact: my-project depends on pandas (^1.2.4)
   1: fact: my-project depends on numpy (^1.20.2)
   1: fact: my-project depends on hiredis (^2.0.0)
   1: fact: my-project depends on loguru (^0.5.3)
   1: fact: my-project depends on pyarrow (^4.0.0)
   1: selecting my-project (0.1.0)
   1: derived: pyarrow (>=4.0.0,<5.0.0)
   1: derived: loguru (>=0.5.3,<0.6.0)
   1: derived: hiredis (>=2.0.0,<3.0.0)
   1: derived: numpy (>=1.20.2,<2.0.0)
   1: derived: pandas (>=1.2.4,<2.0.0)
   1: derived: redis (>=3.5.3,<4.0.0)
   1: derived: bson (>=0.5.10,<0.6.0)
PyPI: No release information found for pyarrow-0.1.0, skipping
PyPI: 1 packages found for pyarrow >=4.0.0,<5.0.0
   1: Version solving took 0.061 seconds.
   1: Tried 1 solutions.

  Stack trace:

  8  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:699 in urlopen
       697│ 
       698│             # Make the request on the httplib connection object.
    →  699│             httplib_response = self._make_request(
       700│                 conn,
       701│                 method,

  7  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:382 in _make_request
       380│         # Trigger any extra validation we need to do.
       381│         try:
    →  382│             self._validate_conn(conn)
       383│         except (SocketTimeout, BaseSSLError) as e:
       384│             # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.

  6  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:1010 in _validate_conn
      1008│         # Force connect early to allow us to validate the connection.
      1009│         if not getattr(conn, "sock", None):  # AppEngine might not have  `.sock`
    → 1010│             conn.connect()
      1011│ 
      1012│         if not conn.is_verified:

  5  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/connection.py:411 in connect
      409│             context.load_default_certs()
      410│ 
    → 411│         self.sock = ssl_wrap_socket(
      412│             sock=conn,
      413│             keyfile=self.key_file,

  4  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/util/ssl_.py:428 in ssl_wrap_socket
      426│ 
      427│     if send_sni:
    → 428│         ssl_sock = _ssl_wrap_socket_impl(
      429│             sock, context, tls_in_tls, server_hostname=server_hostname
      430│         )

  3  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/util/ssl_.py:472 in _ssl_wrap_socket_impl
      470│ 
      471│     if server_hostname:
    → 472│         return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
      473│     else:
      474│         return ssl_context.wrap_socket(sock)

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

  1  /usr/lib/python3.9/ssl.py:1040 in _create
      1038│                         # non-blocking
      1039│                         raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
    → 1040│                     self.do_handshake()
      1041│             except (OSError, ValueError):
      1042│                 self.close()

  SSLCertVerificationError

  [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)

  at /usr/lib/python3.9/ssl.py:1309 in do_handshake
      1305│         timeout = self.gettimeout()
      1306│         try:
      1307│             if timeout == 0.0 and block:
      1308│                 self.settimeout(None)
    → 1309│             self._sslobj.do_handshake()
      1310│         finally:
      1311│             self.settimeout(timeout)
      1312│ 
      1313│     def _real_connect(self, addr, connect_ex):

The following error occurred when trying to handle this error:


  Stack trace:

  2  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/requests/adapters.py:439 in send
      437│         try:
      438│             if not chunked:
    → 439│                 resp = conn.urlopen(
      440│                     method=request.method,
      441│                     url=url,

  1  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/connectionpool.py:755 in urlopen
       753│                 e = ProtocolError("Connection aborted.", e)
       754│ 
    →  755│             retries = retries.increment(
       756│                 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
       757│             )

  MaxRetryError

  HTTPSConnectionPool(host='my.repo.tld', port=443): Max retries exceeded with url: /simple/pyarrow/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)')))

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/urllib3/util/retry.py:574 in increment
      570│             history=history,
      571│         )
      572│ 
      573│         if new_retry.is_exhausted():
    → 574│             raise MaxRetryError(_pool, url, error or ResponseError(cause))
      575│ 
      576│         log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
      577│ 
      578│         return new_retry

The following error occurred when trying to handle this error:


  Stack trace:

  23  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:314 in run
       312│ 
       313│             try:
     → 314│                 exit_code = self._run(io)
       315│             except Exception as e:
       316│                 if not self._catch_exceptions:

  22  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/application.py:167 in _run
       165│         self._load_plugins(io)
       166│ 
     → 167│         return super()._run(io)
       168│ 
       169│     def _configure_io(self, io: IO) -> None:

  21  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:409 in _run
       407│                 io.set_input(ArgvInput(argv))
       408│ 
     → 409│         exit_code = self._run_command(command, io)
       410│         self._running_command = None
       411│ 

  20  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:451 in _run_command
       449│ 
       450│         if error is not None:
     → 451│             raise error
       452│ 
       453│         return event.exit_code

  19  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:435 in _run_command
       433│ 
       434│             if event.command_should_run():
     → 435│                 exit_code = command.run(io)
       436│             else:
       437│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  18  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/base_command.py:118 in run
       116│         io.input.validate()
       117│ 
     → 118│         status_code = self.execute(io)
       119│ 
       120│         if status_code is None:

  17  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/command.py:85 in execute
        83│ 
        84│         try:
     →  85│             return self.handle()
        86│         except KeyboardInterrupt:
        87│             return 1

  16  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/commands/update.py:47 in handle
        45│         self._installer.update(True)
        46│ 
     →  47│         return self._installer.run()
        48│ 

  15  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:112 in run
       110│         local_repo = Repository()
       111│ 
     → 112│         return self._do_install(local_repo)
       113│ 
       114│     def dry_run(self, dry_run: bool = True) -> "Installer":

  14  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:252 in _do_install
       250│             )
       251│ 
     → 252│             ops = solver.solve(use_latest=self._whitelist)
       253│         else:
       254│             self._io.write_line("Installing dependencies from lock file")

  13  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:99 in solve
        97│         with self._provider.progress():
        98│             start = time.time()
     →  99│             packages, depths = self._solve(use_latest=use_latest)
       100│             end = time.time()
       101│ 

  12  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:270 in _solve
       268│ 
       269│         try:
     → 270│             result = resolve_version(
       271│                 self._package, self._provider, locked=locked, use_latest=use_latest
       272│             )

  11  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/__init__.py:24 in resolve_version
        22│     solver = VersionSolver(root, provider, locked=locked, use_latest=use_latest)
        23│ 
     →  24│     return solver.solve()
        25│ 

  10  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:82 in solve
        80│             while next is not None:
        81│                 self._propagate(next)
     →  82│                 next = self._choose_package_version()
        83│ 
        84│             return self._result()

   9  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:371 in _choose_package_version
       369│         if locked is None or not dependency.constraint.allows(locked.version):
       370│             try:
     → 371│                 packages = self._provider.search_for(dependency)
       372│             except ValueError as e:
       373│                 self._add_incompatibility(

   8  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/provider.py:150 in search_for
       148│             packages = self.search_for_url(dependency)
       149│         else:
     → 150│             packages = self._pool.find_packages(dependency)
       151│ 
       152│             packages.sort(

   7  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/pool.py:171 in find_packages
       169│         packages = []
       170│         for repo in self._repositories:
     → 171│             packages += repo.find_packages(dependency)
       172│ 
       173│         return packages

   6  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/legacy_repository.py:272 in find_packages
       270│             versions = self._cache.store("matches").get(key)
       271│         else:
     → 272│             page = self._get("/{}/".format(dependency.name.replace(".", "-")))
       273│             if page is None:
       274│                 return []

   5  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/legacy_repository.py:425 in _get
       423│         url = self._url + endpoint
       424│         try:
     → 425│             response = self.session.get(url)
       426│             if response.status_code in (401, 403):
       427│                 self._log(

   4  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/requests/sessions.py:555 in get
       553│ 
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│ 
       557│     def options(self, url, **kwargs):

   3  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│ 
       544│         return resp

   2  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/requests/sessions.py:655 in send
       653│ 
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│ 
       657│         # Total elapsed time of the request (approximately)

   1  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│ 
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│ 
        55│         return resp

  SSLError

  HTTPSConnectionPool(host='my.repo.tld', port=443): Max retries exceeded with url: /simple/pyarrow/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)')))

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/requests/adapters.py:514 in send
      510│                 raise ProxyError(e, request=request)
      511│ 
      512│             if isinstance(e.reason, _SSLError):
      513│                 # This branch is for urllib3 v1.22 and later.
    → 514│                 raise SSLError(e, request=request)
      515│ 
      516│             raise ConnectionError(e, request=request)
      517│ 
      518│         except ClosedPoolError as e:

@nylocx
Copy link

nylocx commented May 7, 2021

Update, I "solved" the issue. My Certificate downloaded via Chrome had Windows line endings which did not work well.
But I still got errors before I set REQUESTS_CA_BUNDLE to the concatenated certificates.
But it would be nice if it was enough to set the cert in the poetry config.

@kalfa
Copy link
Author

kalfa commented Aug 6, 2021

I confirm that the issue is still present

@mcdevitts
Copy link

mcdevitts commented Aug 10, 2021

I can also confirm that the issue is still present. I'm using my company's pypi server (SSL self-signed), and it can see my package, but now it fails when attempting to contact https://pypi.org/simple/.

It would be great to get this worked out soon, or it would be awesome if we could just bypass SSL. The hacky fix that everyone has mentioned to date no longer appears to work on my install. Plus, hacks are just hacks.

@Mazyod
Copy link

Mazyod commented Oct 17, 2021

My hack was to poetry export then use pip to install.

This is by no means a good hack nor enough, since we still need a way to do poetry update.

@neersighted
Copy link
Member

This should be long-solved by the authentication refactor and special casing of PyPI as a repo -- please open a new issue if you hit this in 2022 on 1.2.x.

Copy link

github-actions bot commented Mar 1, 2024

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 Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/repo Meta-issues for the repository/forge itself kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

7 participants