def stage_repository(self, url):
		"""Create a working directory and download the new files"""

		local = os.path.join(self._updater_path, "update_staging")
		error = None

		# Make/clear the staging folder, to ensure the folder is always clean.
		self.print_verbose(
			"Preparing staging folder for download:\n" + str(local))
		if os.path.isdir(local):
			try:
				shutil.rmtree(local)
				os.makedirs(local)
			except:
				error = "failed to remove existing staging directory"
				self.print_trace()
		else:
			try:
				os.makedirs(local)
			except:
				error = "failed to create staging directory"
				self.print_trace()

		if error is not None:
			self.print_verbose("Error: Aborting update, " + error)
			self._error = "Update aborted, staging path error"
			self._error_msg = "Error: {}".format(error)
			return False

		if self._backup_current:
			self.create_backup()

		self.print_verbose("Now retrieving the new source zip")
		self._source_zip = os.path.join(local, "source.zip")
		self.print_verbose("Starting download update zip")
		try:
			request = urllib.request.Request(url)
			context = ssl._create_unverified_context()

			# Setup private token if appropriate.
			if self._engine.token is not None:
				if self._engine.name == "gitlab":
					request.add_header('PRIVATE-TOKEN', self._engine.token)
				else:
					self.print_verbose(
						"Tokens not setup for selected engine yet")

			# Always set user agent
			request.add_header(
				'User-Agent', "Python/" + str(platform.python_version()))

			self.url_retrieve(urllib.request.urlopen(request, context=context),
							  self._source_zip)
			# Add additional checks on file size being non-zero.
			self.print_verbose("Successfully downloaded update zip")
			return True
		except Exception as e:
			self._error = "Error retrieving download, bad link?"
			self._error_msg = "Error: {}".format(e)
			print("Error retrieving download, bad link?")
			print("Error: {}".format(e))
			self.print_trace()
			return False