-
Notifications
You must be signed in to change notification settings - Fork 255
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 appending git username / password to dependency #115
Allow appending git username / password to dependency #115
Conversation
f0fb9d8
to
6bef827
Compare
6bef827
to
abe9fe5
Compare
34f5576
to
1354d9e
Compare
@python-poetry/triage: This PR is ready for review. |
So sad it’s not yet available. We recently decided to switch GitHub and Poetry but now realized we cannot use the personal access token to add dependencies from private repositories so migration to Poetry is postponned until it will be supported. |
Thanks for requesting a review from the team. Looking forward to the feedback so we can move to get this fixed and into |
@finswimmer, @python-poetry/triage: Any updates on this? I'll rebase to the latest |
1354d9e
to
94b5d34
Compare
new (vcs.git): extract user credential (passord, deployment key, ...) from git url change (vcs.git): change order of init arguments for `ParsedUrl` change (vcs.git): make user, password, port, name and rev optional for `ParsedUrl`
…olean whether the ParsedUrl contains a secret like a password
0e59024
to
75f18a0
Compare
@python-poetry/triage, @finswimmer, @abn, @sdispater : Noticed @jedie's review here, and rebased to the latest I also see that the workflow output requires approval, can one of you please help with that as well? |
it looks like this has been reviewed, approved and is working. can we get this merged ? |
@setu4993 Does this support passing username/personal access token as env variables? I'd like to use this, but it seems like I'd have to hardcode my creds into the file. |
@jimmywan : Good question, I don't think that is possible in |
Reopening this thread - now that this has happened, I cannot get poetry to work with my private dependencies. I receive the following error:
Please advise on any updates to support PATs in poetry; my team is currently blocked by this not existing. |
@steven-dicristofaro: The error you receive had probably nothing to do with this PR/linked issue. It's related to python-poetry/poetry#4402 which is already fixed in poetry 1.1.8. The reasons why we haven't merge this PR are massive security concerns. Providing username and password would mean, that the credentials are in plain text in your |
@finswimmer : Thanks for responding and engaging (albeit after a long time). I agree with your concerns, but I disagree with your conclusion. The choice for tools shouldn't be between choosing to support an existing feature and encouraging better hygiene.
Most people and teams understand the drawbacks of checking in credentials, however, it is sometimes necessary. When I first responded on python-poetry/poetry#2348 and created this PR, it was the only choice we had for hosting private packages, and we used PATs in Should a tool warn and heavily discourage this behavior? Yes. A 100 times yes. But should a tool that builds on top of another package manager not support functionality that is already supported by the default package manager? I think no. By focusing on this one aspect, it keeps all of the other benefits that Choosing to not engage the community and not communicating on an issue that affects users for months at a stretch, sets the wrong standard for a project: It makes users feel unheard and contributors feel unwelcome. |
@finswimmer thanks for the quick response - the link you provided solved my problem (some versioning nonsense with an update to sqlalchemy that happened this week). I do also share your concerns about keeping control over creds, but I also agree with @setu4993 in that it would be nice to have the option of using PAT-based auth (with a profuse set of warnings to the client) to at least give users the comfortability of knowing that poetry supports (or is at least attempting to support) all functions 1-1 of the underlying pip layer. Either way, I am now unblocked so many thanks for that 😄 |
At the end @sdispater has to decide which way poetry should follow here, because it's a matter of philosophy. I'm fine with or without supporting username/passwords.
There is only a loose coupling to |
Would they be in the poetry.lock file if they are used like the following?"
|
Resolves: python-poetry/poetry#2062, python-poetry/poetry#2348. Builds on top of #96.
Changes in #96 (copied from here):
Changes I made on top of @finswimmer's work in #96 (rebased to abe9fe5):
Add tests for when x-oauth-basic GitHub URL is used in package link (Add Personal Access Token Authentication Support poetry#2348).
Add warning and log for when a dependency stores a password in plain text by using the is_unsafe property (based on discussion in allow appending deployment key to username (#2062) poetry#2169 (comment)).
Added tests for changed code.
Updated documentation for changed code.NAHoping this is at a good enough point to review and consider merging into main, to be included for a soon-ish release.