diff --git a/gitlab/client.py b/gitlab/client.py index 94fb66a4a..be8b48f2d 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -533,7 +533,7 @@ def _set_auth_info(self) -> None: self.headers.pop("PRIVATE-TOKEN", None) self.headers["JOB-TOKEN"] = self.job_token - if self.http_username: + if self.http_username and self.http_password: self._http_auth = requests.auth.HTTPBasicAuth( self.http_username, self.http_password )