I’m using poetry to handle my project dependencies.
Here is an example of my pyproject.toml
:
[tool.poetry]
name = "my-package"
version = "0.1.0"
description = "My project"
authors = ["[email protected]"]
[tool.poetry.dependencies]
python = "~3.11"
[tool.poetry.group.ssh.dependencies]
my-private-project1 = { git = "ssh://[email protected]/myorg/myrepo1.git", rev = "main" }
my-private-project2 = { git = "ssh://[email protected]/myorg/myrepo2.git", rev = "main" }
The problem arises when I try to install this project within a Dockerfile
, poetry
version is 1.8.3
which is the last update so far.
I specially set a group called ssh
so I can skip the install of this packages and do it by my own because poetry
can’t handle properly nested private repositories (or I couldn’t find the way).
The command that I’m using within the Dockerfile
:
poetry install --without ssh
That command fails with error message:
Updating dependencies
Resolving dependencies...
[email protected]: Permission denied (publickey).
Does anyone know what would be the best approach to directly ignore those ssh
dependencies but still defining them in the pyproject?
I tried commenting and uncommenting the ssh
group, whenever I comment the ssh
group and then delete the --without ssh
argument from the command, the Dockerfile
builds correctly.