diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 90ffa5090..c42acaf46 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -529,7 +529,10 @@ def delete(self, obj, id=None, **kwargs): params=params, headers=headers, verify=self.ssl_verify, - timeout=self.timeout) + timeout=self.timeout, + auth=requests.auth.HTTPBasicAuth( + self.http_username, + self.http_password)) except Exception as e: raise GitlabConnectionError( "Can't connect to GitLab server (%s)" % e) @@ -576,7 +579,10 @@ def create(self, obj, **kwargs): r = self.session.post(url, data=data, headers=headers, verify=self.ssl_verify, - timeout=self.timeout) + timeout=self.timeout, + auth=requests.auth.HTTPBasicAuth( + self.http_username, + self.http_password)) except Exception as e: raise GitlabConnectionError( "Can't connect to GitLab server (%s)" % e) @@ -626,7 +632,10 @@ def update(self, obj, **kwargs): r = self.session.put(url, data=data, headers=headers, verify=self.ssl_verify, - timeout=self.timeout) + timeout=self.timeout, + auth=requests.auth.HTTPBasicAuth( + self.http_username, + self.http_password)) except Exception as e: raise GitlabConnectionError( "Can't connect to GitLab server (%s)" % e)