Opened 6 months ago

Last modified 6 months ago

#28426 assigned Bug

startproject with a remote template gives an authentication prompt on Python 2 but 401: Unauthorized on Python 3

Reported by: Elena Georgiou Strouthos Owned by: Irindu Indeera
Component: Core (Management commands) Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Elena Georgiou Strouthos)

We have a Django template hosted in a private repository.

When we run
django-admin.py startproject --template=https://bitbucket.org/<team>/simple_template/get/master.zip --name=Procfile myproject .
with Python 2.7 we get a prompt for username and password.

However the same command using Python 3.6 returns the following error:
CommandError: couldn't download URL https://bitbucket.org/<team>/simple_template/get/master.zip to master.zip: HTTP Error 401: Unauthorized

Change History (4)

comment:1 Changed 6 months ago by Tim Graham

Component: UncategorizedCore (Management commands)
Summary: Starting a project from a template with Django 1.11 and Python 3startproject with a remote template gives an authentication prompt on Python 2 but 401: Unauthorized on Python 3
Triage Stage: UnreviewedAccepted

Perhaps there's a difference in urlretrieve() between Python 2 and 3. I'm not sure if there's anything Django can do about it. Do you want to investigate?

comment:2 Changed 6 months ago by Elena Georgiou Strouthos

Description: modified (diff)

comment:3 Changed 6 months ago by Elena Georgiou Strouthos

I can see from the documentation that urlretrieve is a legacy interface that will be deprecated in the future (https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve) but other than that I don't see anything that would explain why with in Python 2 you get a prompt but not in Python 3

Last edited 6 months ago by Elena Georgiou Strouthos (previous) (diff)

comment:4 Changed 6 months ago by Irindu Indeera

Owner: changed from nobody to Irindu Indeera
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top