Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES/7425.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed a bug when syncing a custom repository using the upstream username only (no password)
did not send any authentication since both were required by the download factory.
9 changes: 4 additions & 5 deletions pulpcore/download/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .http import HttpDownloader
from .file import FileDownloader


PROTOCOL_MAP = {
"http": HttpDownloader,
"https": HttpDownloader,
Expand Down Expand Up @@ -204,10 +203,10 @@ class to be instantiated.
login=self._remote.proxy_username, password=self._remote.proxy_password
)

if self._remote.username and self._remote.password:
options["auth"] = aiohttp.BasicAuth(
login=self._remote.username, password=self._remote.password
)
if self._remote.username:
# Support username-only auth with empty passwords
password = self._remote.password or str()
options["auth"] = aiohttp.BasicAuth(login=self._remote.username, password=password)

kwargs["throttler"] = self._remote.download_throttler if self._remote.rate_limit else None

Expand Down
Loading