Skip to content

Instantly share code, notes, and snippets.

@sloev
Created March 17, 2020 12:20
Show Gist options
  • Save sloev/357be5288a6baad78747c801464fb9f1 to your computer and use it in GitHub Desktop.
Save sloev/357be5288a6baad78747c801464fb9f1 to your computer and use it in GitHub Desktop.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment