You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSL certificate projects list , 400 Bad Request #1934
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.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
This looks more like a misconfigured gitlab or nginx config to me. Is your external_url set to http? This would send the wrong next links in paginated lists.
Either way, please set gl.enable_debug() and paste the urllib3 debug logs so we can take a look.
Are you really using gitlab 10.0.4? And what is the python-gitlab version? 3.7 is the version of python, I assume.
I think my suspicion was correct and your gitlab is configured to advertise an HTTP url instead of HTTPS. This sends the wrong link to follow when using list(all=True) and making subsequent requests (all links in header: Link: are http). See:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gitlab.co-xxx.com:443
...
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): gitlab.co-xxx.com:443
I'm going to close this as it's an issue with your GitLab instance and not python-gitlab but please reopen if you still have issues after you've fixed the external_url. Note gitlab 10.x is really old and we can't really support that. I suggest you gradually upgrade to 14.9.
@X-rapido please also revoke your private token and create a new one as it was exposed in this log (next time take care to redact these before pasting the logs)
Activity
nejch commentedon Mar 26, 2022
This looks more like a misconfigured gitlab or nginx config to me. Is your
external_urlset tohttp? This would send the wrongnextlinks in paginated lists.Either way, please set
gl.enable_debug()and paste the urllib3 debug logs so we can take a look.Are you really using gitlab 10.0.4? And what is the
python-gitlabversion? 3.7 is the version of python, I assume.lrk1056 commentedon Mar 29, 2022
gl.projects.list()no problemgl.projects.list(all=True)errorpython-version: 3.7
Gitlab server version: gitlab-10.0.4
nejch commentedon Mar 31, 2022
I think my suspicion was correct and your gitlab is configured to advertise an HTTP url instead of HTTPS. This sends the wrong link to follow when using
list(all=True)and making subsequent requests (all links inheader: Link:are http). See:Tell your administrator to configure the external URL properly: you should use HTTPS, not HTTP:
https://docs.gitlab.com/omnibus/settings/configuration.html#configure-the-external-url-for-gitlab
I'm going to close this as it's an issue with your GitLab instance and not python-gitlab but please reopen if you still have issues after you've fixed the
external_url. Note gitlab 10.x is really old and we can't really support that. I suggest you gradually upgrade to 14.9.@X-rapido please also revoke your private token and create a new one as it was exposed in this log (next time take care to redact these before pasting the logs)
lrk1056 commentedon Mar 31, 2022
Thank you for your remind, Thank you for reply