Poetry add/update fails to ask for git user/password again if not running in -vv
- [x] I am on the latest Poetry version.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- 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.
- Create a new python project with clean pyproject.toml
- CMD
poetry add git+https://[git URL] - poetry asks for username and password for
[git URL] - poetry outputs
Updating dependencies, thenResolving dependencies... (xxx.s). - poetry never stops resolving dependencies. Press
Ctrl-C - This time with
-vvoption -- CMDpoetry add -vv git+https://[git URL] - poetry asks for username and password for
[git URL] - poetry outputs
Updating dependencies, thenResolving dependencies... - poetry asks for username and password for
[git URL]for the second time - poetry resolves dependencies, writes lock file
- poetry outputs
Finding the necessary packages for the current system - poetry asks for username and password for
[git URL]for the third time - poetry outputs
Package operations: ... - 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.
Same issue here - duplicate of #3409
Same issue with adding package from private GitHub repo :(
I also encountered this issue, but my context is different. If you misspell the Github repository name, the Poetry installation will never finish.
If you use dependency like:
web3-ethereum-defi = { git = "https://github.com/tradingstrategy-ai/web3-ethereum-defi.git", rev = "bbf7827b82738b8870bd5f892aca4f0c9325c751" }
... but you misspell the repository name:
web3-ethereum-defi = { git = "https://github.com/tradingstrategy-ai/notexist.git", rev = "bbf7827b82738b8870bd5f892aca4f0c9325c751" }
... and you are not running -vv.
Poetry will try to install forever and does not fail with an error.

I use SSH keys with passphrase. I see the lock icon which is the prompt asking for the passphrase. It's not entirely obvious.