Skip to content

Commit 1ac0e27

Browse files
authored
fix(gitlab): add missing ssl_verify parameter for private_token auth (#2173)
When using private_token authentication (GITLAB.AUTH_TYPE = 'private_token'), the ssl_verify setting was not being passed to the GitLab client constructor. This caused SSL certificate verification to remain enabled even when ssl_verify was explicitly set to false in the configuration, breaking connections to self-hosted GitLab instances with self-signed certificates. The oauth_token authentication path correctly includes ssl_verify, but the private_token path was missing it. This commit adds the missing parameter to ensure consistent behavior for both authentication methods.
1 parent f6be90f commit 1ac0e27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pr_agent/git_providers/gitlab_provider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def __init__(self, merge_request_url: Optional[str] = None, incremental: Optiona
5757
else: # private_token
5858
self.gl = gitlab.Gitlab(
5959
url=gitlab_url,
60-
private_token=gitlab_access_token
60+
private_token=gitlab_access_token,
61+
ssl_verify=ssl_verify
6162
)
6263
except Exception as e:
6364
get_logger().error(f"Failed to create GitLab instance: {e}")

0 commit comments

Comments
 (0)