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

Support HTTP authentication for git dependencies #2050

Closed
2 tasks done
evgenii-petrov-arrival opened this issue Feb 17, 2020 · 6 comments
Closed
2 tasks done

Support HTTP authentication for git dependencies #2050

evgenii-petrov-arrival opened this issue Feb 17, 2020 · 6 comments
Labels
kind/feature Feature requests/implementations

Comments

@evgenii-petrov-arrival
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

I want to pull a dependency from a private git repo, but the repo requires HTTP authentication.

As far as I can tell, https://python-poetry.org/docs/repositories/ only supports PyPI repositories, so git repositories are not supported.

I want to be able to do something similar to:

$ poetry config repositories.git-domain-repo https://git.domain/repo/
$ poetry config http-basic.git-domain-repo username password

Or, even better, to configure auth for the whole git.domain.

Please add a way to specify a username and a password to be used when pulling a git dependency, such that the username and password are specified outside of pyproject.toml .

@evgenii-petrov-arrival evgenii-petrov-arrival added the kind/feature Feature requests/implementations label Feb 17, 2020
@ephes
Copy link

ephes commented Mar 18, 2020

Poetry is a really cool project. This is my first issue using it - so all thumbs up :).

I'm not sure this should be a feature request. Stumbled across this trying to migrate a project from requirements.txt to poetry. Pip installed the git url with http basic authentication.

Poetry failed when trying to add the same url:

poetry add git+https://user+name:password@gitlab.foobar.com/dept/repo
Skipping virtualenv creation, as specified in config file.

[ValueError]
Invalid git url "git+https://user+name:password@gitlab.foobar.com/dept/repo"

Ok, maybe basic auth urls are just not supported. But trying this without username and password poetry ran into an endless dependency resolving loop:

poetry add git+https://gitlab.foobar.com/dept/repo
Skipping virtualenv creation, as specified in config file.
Username for 'https://gitlab.foobar.com': user+name
Password for 'https://user+name@gitlab.foobar.com':

Updating dependencies
Resolving dependencies... (276.9s)^C

I think this should be a bug report.

@finswimmer
Copy link
Member

@ephes: The problem in your example is the + in the username. This will be fixed with PR #2169.

fin swimmer

@ephes
Copy link

ephes commented Mar 18, 2020

Thanks a lot, I suspected something like that and therefore preserved the „+“ :).

@lpilz
Copy link

lpilz commented May 30, 2022

@evgenii-petrov-arrival I second this feature request, however this might be solved with #5581. Not 100% sure though

@abn
Copy link
Member

abn commented Feb 28, 2024

HTTP Authentication is already supported in Poetry. See #5567 #5581.

Doc: https://python-poetry.org/docs/dependency-specification/#git-dependencies

@abn abn closed this as completed Feb 28, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

5 participants