Opened 8 years ago
Closed 8 years ago
#29366 closed Bug (duplicate)
startproject --template option doesn't support http authentication, neither through .netrc file
| Reported by: | Nahuel | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 2.0 |
| Severity: | Normal | Keywords: | netrc, project template, authentication |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I'm trying to install project from private repository behind an http basic authentication.
Trying the url authentication schema like http://username:password@domain.com/myfile.zip provide an URL parsing error: password is considered as http port.
Trying to use NETRC environment variable or the ~/.netrc file doesn't provide any effect.
This come from the use of urllib.request.urlretrieve there, that doesn't support any kind of authentication:
https://github.com/django/django/blob/master/django/core/management/templates.py#L262
I think anywhere an URL can be used, django should support http authentication.
Duplicate of #28426.