- Notifications
You must be signed in to change notification settings - Fork673
Closed
Labels
Description
Description of the problem, including code/CLI snippet
I need to request it locally with an SSL certificate,The following code
importgitlabimportrequestsfromrequests_pkcs12importPkcs12AdapterBASE_URL="https://gitlab.co-xx.com"session=requests.Session()session.mount(BASE_URL,Pkcs12Adapter(pkcs12_filename='cert/client-20220301.p12',pkcs12_password='test'))gl=gitlab.Gitlab(url=BASE_URL,private_token="8J9HsANQo8zFsUZEwShK",api_version=4,session=session)if__name__=='__main__':groups_list=gl.groups.list()forgroupingroups_list:print('组名:{} [{}]'.format(group.name,group.id))g_projects=group.projects.list(all=True)forg_projecting_projects:print(g_project)
Expected Behavior
Print the list of items correctly
raise error(e.error_message, e.response_code, e.response_body) from egitlab.exceptions.GitlabListError: 400: <html><head><title>400 The plain HTTP request was sent to HTTPS port</title></head><body bgcolor="white"><center><h1>400 Bad Request</h1></center><center>The plain HTTP request was sent to HTTPS port</center></body></html>
Actual Behavior
The group list prints correctly,However, an exception occurred in obtaining the projects list
Specifications
- python-gitlab version: 3.7
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): gitlab-10.0.4