-
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
git: allow http auth via dulwich #5567
Conversation
This change makes use of existing repository authentication mechanisms to enable http authentication for git dependencies.
Opted to reuse |
Really excited for this commit. Forgive my ignorance of poetry's release cadence. When would this be expected in a release? |
@abn as nicely described in #5955, that MR doesn't fully solve the issue, because it works only when using In general - leaking credentials are problematic, so the above feature for sure would be useful for Actually, taking into consideration the workaround with specifying the token manually in Having said that, I would be glad to hear if you see any other solutions for that issue. |
Generally I would avoid bundling private Git deps, and if you have to SSH keys would be the preferred way to solve this. I'm really not sure that a 'controlled' option to leak credentials into the lockfile (and thus built artifacts) is a good idea as it's incredibly likely to bite more users than it helps. Also, the 'correct' way to solve this would be uploading your packages to a private registry -- private Git deps is not a great option for this workflow. I do think that just because something is possible as a workflow, doesn't mean it's necessarily a good one. Maybe beefing up our docs to suggest against using Git deps for private packages would be helpful. Regardless, let's take discussion back to #5955 as this is not a great forum/place for a feature request. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This change makes use of existing repository authentication mechanisms to enable http authentication for git dependencies.
HTTP basic authentication for git repositories can now be enabled using these commands.
Thanks to the improvements in #5518, You can also add organisation or host level tokens by using a shorter url for the repository in config like,
https://github.com
orhttps://github.com/org
. But do remember that this would apply to all clones - so project specific tokens are better. Alternatively, usepoetry config --local
.This builds on top of #5428 and #5518 to enable http basic auth for vcs sources without issues like leaking credentials into the lockfile or pyproject.toml files as with previous attempts in #2169 and python-poetry/poetry-core#115.
Resolves: #2062 #2050
Closes: python-poetry/poetry-core#115