python-poetry / python-poetry/poetry

Poetry config reports wrong error message when missing values for `poetry config http-basic`

Open
#6,911 6 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • Poetry version: 1.2.2
  • Python version: 3.9.2
  • OS version and name:Debian GNU/Linux 11 (bullseye)
  • pyproject.toml: Default config after poetry init - see below
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Leo Kirchner <leo.kirchner@networktocode.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I think the error message for missing credentials in this command could be a little more precise:

$ poetry config http-basic.foo

There is no http-basic.foo setting.

This is especially relevant when using environment variables inside a DOCKERFILE where the variables may be (accidentally) undefined:

$ poetry config http-basic.foo $FOO_NAME $FOO_PASSWORD

There is no http-basic.foo setting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI entry point for poetry config http-basic and reproduce the two commands shown in the issue, including the undefined environment-variable case. Trace how missing values are handled and verify that the resulting message distinguishes missing credentials from an absent setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.