summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/client.py b/gitlab/client.py
index 94fb66a..be8b48f 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -533,7 +533,7 @@ class Gitlab:
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
)