Skip to content

poetry config not working for HTTP auth so unable to pull private package #2125

@rvs1729

Description

@rvs1729
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name:
debian:10 
root@91ca4e71776b:/# uname -a
Linux 91ca4e71776b 4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018 x86_64 GNU/Linux
  • Poetry version:
poetry --version
Poetry version 1.0.3
  • Link of a Gist with the contents of your pyproject.toml file:
  
[tool.poetry]
name = "foo_bar"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
private_package = "^1.0.13"


[tool.poetry.dev-dependencies]



[tool.poetry.scripts]


[[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple"
default = true		

[build-system]
requires = ["poetry>=1.0.3"]
build-backend = "poetry.masonry.api"

Issue

$ poetry config repositories. foo https://foo.bar/simple
$ poetry config $USER_ID $USER_PASSWORD
$ poetry add private_package

[ValueError]
Could not find a matching version of package private_package

and I tried with env as well POETRY_HTTP_BASIC_FOO_USERNAME POETRY_HTTP_BASIC_FOO_PASSWORD but not working.

but poetry add private_package working after mounting config & password at ~/.config/pypoetry/auth.toml & ~/.config/pypoetry/config.toml

problem with mounting config is throwing user and password when error occurred while poetry install and I have to add default = true to [[tool.poetry.source]] to my pyproject.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions