python-poetry / python-poetry/poetry

Does not store repository credentials

Open
#4,685 1 comment 1 reaction 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

  • 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: macOS Big Sur 11.6

  • Poetry version: 1.1.11

Issue

Poetry does not store the password for my private repo when using the config command as outlined in the documentation.

poetry config http-basic.gitlab username password

This, to no surprise, leads to an authentication error when trying to install a package from that private repo.

I found out that no password is stored by directly checking the configuration in ~/Library/Application Support/pypoetry/auth.toml, reading simply:

[http-basic]
[http-basic.gitlab]
username = "username"

By adding the following line, I was able to patch the issue:

password = "password"

However, the password disappears every time I run the config command again:

poetry config http-basic.gitlab username password

Relevant section of my pyproject.toml:

[[tool.poetry.source]]
name = "gitlab"
url = "https://gitlab.com/api/v4/groups/1123.../-/packages/pypi/simple"

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

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 with the config command's handling of repository credentials and inspect the generated auth.toml file described in the report. Reproduce poetry config http-basic.gitlab username password, then verify that the password persists and private-package installation authenticates successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.