Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt for git credentials when trying to install package from private repository when credential cache is empty #9627

Open
HYBRID-BEING opened this issue Aug 15, 2024 · 2 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@HYBRID-BEING
Copy link

Issue Kind

Other

Description

One of the dependencies in my project comes from a private repository. I have git's credential.helper set to cache, and sometimes credentials in cache expire before i run poetry install (usually with --sync). This causes following error:

Failed to clone https://***.git, check your git configuration and permissions for this repository.

I understand that this happens due to the fact that Poetry is unable to get credentials from the cache (although, it was a bit confusing at first, as there is nothing wrong with git configuration and permissions), but it would've been nice, if i was prompted for credentials when this happens.

Impact

This would make it more obvious for users, why exactly is Poetry unable to install the package in this particular case. It would also save users from having to cache credentials and re-enter the command, by continuing execution after the prompt.

Workarounds

Executing any git command against repository in question caches credentials and allows Poetry to use credentials until they expire.

@HYBRID-BEING HYBRID-BEING added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Aug 15, 2024
@dimbleby
Copy link
Contributor

This is the opposite of #9626, #5880, etc

Generally poetry's intention is not to do interactive stuff during poetry install because it tends to get lost and look like a hang.

@HYBRID-BEING
Copy link
Author

HYBRID-BEING commented Aug 15, 2024

Hmm, from what i see, people were reporting that Poetry was getting stuck because prompts would not be shown properly or they had to enter credentials multiple times per Poetry command in -vvv mode. Feels like disabling the prompt is more of a workaround for that, tbh.
But if that is the direction Poetry is taking, than i guess i'll just have to deal with it. From what i gathered detecting this won't be easy either (for a separate error message), so maybe, at least, current error message could also mention the credentials (i guess they technically fall under "configuration" part, but i think explicit mention would remedy slight confusion like mine)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants