i have documented here how to do it with env vars: https://gist.github.com/sloev/a5c1a5091abde30a70c14bad37e35a76
it says:
a response to python-poetry/poetry#910
$ cat pyproject.toml
[[tool.poetry.source]]
name = "gemfury"
url = "https://pypi.fury.io/GEM_FURY_USERNAME"
[tool.poetry.dependencies]
python = "^3.7"
secret_package = {version = "^2.0.0", source = "gemfury"}
Then you write the locally checked in non-dangerous poetry.toml
file in the project directory.
$ cat poetry.toml
[repositories]
[repositories.gemfury]
url = "https://pypi.fury.io/GEM_FURY_USERNAME"
then you can install with:
POETRY_HTTP_BASIC_GEMFURY_PASSWORD=GEMFURY_TOKEN \
POETRY_HTTP_BASIC_GEMFURY_USERNAME=GEMFURY_TOKEN \
poetry install
in this way the token is not cached during ci or anything