Poetry plugin that adds support for pypi.org mirrors and pull-through caches. It enables Poetry to substitute connections to pypi.org with connections to a mirror or pull-through cache without requiring project configuration changes. This design prevents source entries for the mirror from appearing in `poetry.lock`. The current version is 0.6.3 and it is actively maintained.
poetry self add poetry-plugin-pypi-mirrorNo compatibility data collected yet for this library.
Install the plugin using `poetry self add`. Then, configure your PyPI mirror URL either via the `POETRY_PYPI_MIRROR_URL` environment variable or by setting `plugins.pypi_mirror.url` in your Poetry configuration (global or project-specific). The environment variable takes precedence. Once configured, Poetry commands that interact with PyPI (like `poetry add` or `poetry install`) will automatically use the mirror. If authentication is required, configure it for the 'PyPI' repository using `poetry config http-basic.PyPI <username> <password>`.
Always check the plugin's GitHub repository or release notes for compatibility information when upgrading Poetry or the plugin.
Be mindful of which configuration method you use. If you experience unexpected mirror usage, check your environment variables first.
Ensure you configure authentication for the 'PyPI' repository name within Poetry's configuration, even if it's redirecting to your custom mirror.
Periodically check your `poetry.lock` file after updates to ensure no unintended mirror source URLs are being written if this behavior is critical to your workflow.
If you intended to update the plugin, use `poetry self update poetry-plugin-pypi-mirror` or `poetry self add poetry-plugin-pypi-mirror@latest`.
Ensure your mirror is correctly configured and accessible. The `poetry-plugin-pypi-mirror` is designed to handle this transparently for project dependencies when configured via `POETRY_PYPI_MIRROR_URL` or `plugins.pypi_mirror.url`. If this error occurs during Poetry's own installation, workarounds might involve temporarily disabling hash checks or ensuring `pip.conf` is respected during the installation script.
Verify that the `POETRY_PYPI_MIRROR_URL` environment variable or the `plugins.pypi_mirror.url` setting in your Poetry configuration (`poetry config --list`) is correct and points to a valid and accessible PEP 503-compatible mirror. Also, confirm that the desired package is actually available on the configured mirror.
Check network connectivity to your mirror URL. Ensure that corporate proxies or firewalls are not interfering with SSL connections. You may need to configure proxy settings for Poetry (`poetry config http-proxy` and `poetry config https-proxy`) or ensure the necessary CA certificates are trusted in your environment.