You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow to set METADATA_URL in an environment variable #144
Hello,
I need to install poetry on a server that is not connected to internet.
When executing the installation script previsously copied on the server, I encounter a problem when the script attempts to retrieve metadata. This seems to be due to this line in the script : METADATA_URL = "https://pypi.org/pypi/poetry/json".
Would it be possible to allow to set this parameter via an environment variable, e.g. POETRY_METADATA_URL ?
In advance, many thanks
Kind regards
Arnaud
Many thanks @dimbleby for your very quick answer
I realize I was not very clear ! To be more precise, my server has no direct access to internet, but is behind a "Sonatype Nexus Repository Manager" proxy.
I already configured pip with pip config --global set global.index-url <my-sonartype-nexus-pypi-repository-url>
With such an environment variable, I could either set a nexus-type url for https://pypi.org/pypi/poetry/json, or set a local path like "file:///D:/Python/_install/metadata.json"
if you have a usable repository you probably are better off just using one of the other installation methods eg pipx, or manually create a venv and pip install poetry directly
I tryed both alternative methods, and my feeling was :
using pipx was more complex, since it needs to install a new tool
i was not very confortable with the manual installation, since it is not detailled for windows
In addition, if i configure my nexus proxy so that it can serve the installation script beyond the firewall, I no longer need to previsously copy the the installation script on the server.
I felt that using the official installer would be more straigtforward, I guess such a command would do the job :
Within "Sonatype Nexus Repository Manager", i can set any URL as a proxy, not necessarily a repository URL
I could set https://pypi.org/pypi/poetry/json as a proxied-url, allowing me to reach the json content behind my firewall
Unless I misunderstand your point... ;)
When pypi.org is blocked, and if we can use another repository like Nexus, how can we install dependencies with poetry globally for any project without adding the poetry source to pyproject.toml in each application?
Activity
dimbleby commentedon Jul 11, 2024
and what is the rest of your plan? how do you expect to download poetry?
arnauddeblic commentedon Jul 11, 2024
Many thanks @dimbleby for your very quick answer
I realize I was not very clear ! To be more precise, my server has no direct access to internet, but is behind a "Sonatype Nexus Repository Manager" proxy.
I already configured pip with
pip config --global set global.index-url <my-sonartype-nexus-pypi-repository-url>With such an environment variable, I could either set a nexus-type url for https://pypi.org/pypi/poetry/json, or set a local path like
"file:///D:/Python/_install/metadata.json"dimbleby commentedon Jul 11, 2024
if you have a usable repository you probably are better off just using one of the other installation methods eg pipx, or manually create a venv and pip install poetry directly
arnauddeblic commentedon Jul 11, 2024
I tryed both alternative methods, and my feeling was :
In addition, if i configure my nexus proxy so that it can serve the installation script beyond the firewall, I no longer need to previsously copy the the installation script on the server.
I felt that using the official installer would be more straigtforward, I guess such a command would do the job :
dimbleby commentedon Jul 11, 2024
I doubt nexus even offers the json API
arnauddeblic commentedon Jul 11, 2024
Within "Sonatype Nexus Repository Manager", i can set any URL as a proxy, not necessarily a repository URL
I could set
https://pypi.org/pypi/poetry/jsonas a proxied-url, allowing me to reach the json content behind my firewallUnless I misunderstand your point... ;)
spcocs commentedon Dec 10, 2025
When pypi.org is blocked, and if we can use another repository like Nexus, how can we install dependencies with poetry globally for any project without adding the poetry source to
pyproject.tomlin each application?gmashrsa-design commentedon May 23, 2026