tosher / StGitlab

Sublime text Gitlab manager
Other
12 stars 0 forks source link

ssl error when requesting gitlab #8

Open torniker opened 2 years ago

torniker commented 2 years ago
Traceback (most recent call last):
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/util/ssl_.py", line 325, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "./python3.3/ssl.py", line 246, in wrap_socket
  File "./python3.3/ssl.py", line 350, in __init__
  File "./python3.3/ssl.py", line 346, in __init__
  File "./python3.3/ssl.py", line 553, in do_handshake
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/Sublime Text/Packages/requests/all/requests/adapters.py", line 439, in send
    timeout=timeout
  File "/path/to/Sublime Text/Packages/requests/all/requests/packages/urllib3/connectionpool.py", line 630, in urlopen
    raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/Sublime Text/Packages/StGitlab/base/stg_project.py", line 39, in get_project
    projects = gitlab.projects(all=True)
  File "/path/to/Sublime Text/Packages/StGitlab/base/stg_gitlab.py", line 127, in projects
    self.cprojects = self.conn.projects.list(**kwargs)
  File "/path/to/Sublime Text/Packages/StGitlab/base/../libs/gitlab/exceptions.py", line 267, in wrapped_f
    return f(*args, **kwargs)
  File "/path/to/Sublime Text/Packages/StGitlab/base/../libs/gitlab/mixins.py", line 134, in list
    obj = self.gitlab.http_list(path, **data)
  File "/path/to/Sublime Text/Packages/StGitlab/libs/gitlab/__init__.py", line 640, in http_list
    return list(GitlabList(self, url, query_data, **kwargs))
  File "/path/to/Sublime Text/Packages/StGitlab/libs/gitlab/__init__.py", line 767, in __init__
    self._query(url, query_data, **kwargs)
  File "/path/to/Sublime Text/Packages/StGitlab/libs/gitlab/__init__.py", line 772, in _query
    result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
  File "/path/to/Sublime Text/Packages/StGitlab/libs/gitlab/__init__.py", line 531, in http_request
    result = self.session.send(prepped, timeout=timeout, **settings)
  File "/path/to/Sublime Text/Packages/requests/all/requests/sessions.py", line 642, in send
    r = adapter.send(request, **kwargs)
  File "/path/to/Sublime Text/Packages/requests/all/requests/adapters.py", line 513, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)
tosher commented 2 years ago

Please, try the settings option: "ssl_verify": false

torniker commented 2 years ago

I had (still have) "ssl_verify": false in my config, but the result is the same

tosher commented 2 years ago

Please post your config without sensitive information

torniker commented 2 years ago
{
    "gitlab_url": "https://gitlab.mydomain.com",
    "api_token": "apitoken",
    "ssl_verify": false,
    "users_group_filter": ["group1", "group2"],  // group names
}