-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow Git to request user credentials if specifically desired #6863
Conversation
13ca1cf
to
2f16aeb
Compare
I fixed the issue pointed out by |
Did you test this? I don't think it will work. IIRC the flow that you are trying to restore just didn't work: unless running poetry with verbose output - and why would you do that? - the user doesn't even see the prompt, and so assumes that poetry has hung. |
I have tested the original code being set to "0" as well as removing the offending line of code
|
I have tested this PR in a private environment that cannot be shared due to the nature of the git repositories in question (they aren't hosted on github). I am still thinking of a simple test case for this PR that can be shows publicly. |
2f16aeb
to
7eb0475
Compare
I was able to run this fix on poetry 1.2.2 today and the authentication request popped up as expected. I did not have to add verbosity to the |
If a user adds a dependency, then runs |
I do not think this is desired as this can open up a can of worms. It is better to fail on failed access attempts requiring user user to unlock or setup credentials. Please refer to the documentation on instructions to add credentials. poetry config repositories.git-org-project https://github.com/org/project.git
poetry config http-basic.git-org-project username token
poetry add git+https://github.com/org/project.git Alternatively, enable and use |
This PR is related to #2825.
This PR addresses the need to let the user decide if they need to submit user credentials when cloning Git repositories. Most users don't want to force a user to enter credentials. This PR does not change that functionality. This PR simply enables the user to decide for themselves if they want
poetry
to request credentials or not when cloning repositories with Git.I would suspect that better documentation should be included regarding this issue. I am happy to add documentation, I am not sure where to add said documentation.
Example python program that demonstrates the desired functionality:
Define the environment variable
GIT_TERMINAL_PROMPT
to a value of0
or1
to see the behavior change w.r.t. not defining the variable at all.