Skip to content

Commit

Permalink
Use proxy auth credentials of a Remote when syncing content
Browse files Browse the repository at this point in the history
closes pulp#801
  • Loading branch information
fao89 committed Jan 27, 2022
1 parent cc11e6a commit 8544f15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/801.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use proxy auth credentials of a Remote when syncing content
4 changes: 4 additions & 0 deletions pulp_ansible/app/downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ class to be instantiated.
options = {"session": self._session}
if self._remote.proxy_url:
options["proxy"] = self._remote.proxy_url
if self._remote.proxy_username and self._remote.proxy_password:
options["proxy_auth"] = BasicAuth(
login=self._remote.proxy_username, password=self._remote.proxy_password
)

if not self._remote.token and self._remote.username and self._remote.password:
options["auth"] = BasicAuth(login=self._remote.username, password=self._remote.password)
Expand Down

0 comments on commit 8544f15

Please sign in to comment.