From 056b323331ccdd724827b8cc204ec80c898e091d Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Thu, 27 Jan 2022 11:01:54 +0000 Subject: [PATCH] Use proxy auth credentials of a Remote when syncing content closes #801 --- CHANGES/801.bugfix | 1 + pulp_ansible/app/downloaders.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 CHANGES/801.bugfix diff --git a/CHANGES/801.bugfix b/CHANGES/801.bugfix new file mode 100644 index 000000000..0de0822a8 --- /dev/null +++ b/CHANGES/801.bugfix @@ -0,0 +1 @@ +Use proxy auth credentials of a Remote when syncing content diff --git a/pulp_ansible/app/downloaders.py b/pulp_ansible/app/downloaders.py index 4ef70d06f..528172c17 100644 --- a/pulp_ansible/app/downloaders.py +++ b/pulp_ansible/app/downloaders.py @@ -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)