python-poetry / python-poetry/poetry

Poetry add/update fails to ask for git user/password again if not running in -vv

Open
#3,492 4 comments 5 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

  • 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: Pop_OS!/Ubuntu 20.10
  • Poetry version: 1.1.4
  • Link of a Gist with the contents of your pyproject.toml file: NA

Issue

I use Poetry to install a python package on a git repository in my private gitea server, which requires user and password authentication.

If I install normally (without -vv option), poetry asks for my user and password first, then enters into resolve dependency hell.

If I install with -vv, poetry now asks for my user and password multiple times, but installs as expected.

Steps to reproduce.
  1. Create a new python project with clean pyproject.toml
  2. CMD poetry add git+https://[git URL]
  3. poetry asks for username and password for [git URL]
  4. poetry outputs Updating dependencies, then Resolving dependencies... (xxx.s).
  5. poetry never stops resolving dependencies. Press Ctrl-C
  6. This time with -vv option -- CMD poetry add -vv git+https://[git URL]
  7. poetry asks for username and password for [git URL]
  8. poetry outputs Updating dependencies, then Resolving dependencies...
  9. poetry asks for username and password for [git URL] for the second time
  10. poetry resolves dependencies, writes lock file
  11. poetry outputs Finding the necessary packages for the current system
  12. poetry asks for username and password for [git URL] for the third time
  13. poetry outputs Package operations: ...
  14. package install as per normal.
My guess

Poetry was supposed to ask for my user name and password multiple times in normal mode but did not.

As a user, I expected poetry not to ask me to repeatedly enter my credentials during the same run.

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 by reproducing poetry add git+https://[git URL] with and without -vv, using a private authenticated Git server as described. Compare credential prompts and resolver behavior, then verify that the normal command completes dependency resolution and installation without hanging while avoiding unnecessary repeated prompts.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.