Getting an SSL error when querying project #3212
-
Hi!
I can't figure out if it's something I've done somehow, but I don't think I touched anything. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I pasted this into Google Gemini The requests.exceptions.SSLError: HTTPSConnectionPool(host='gitlab.example.com', port=80): Max retries exceeded with url: ... (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1028)'))) error indicates a problem with the SSL/TLS handshake between your Python program and the GitLab server.
Correct URL for HTTPS
|
Beta Was this translation helpful? Give feedback.
-
I found out the root cause by printing the server responses from within the urllib library:
So it was a configuration issue, I had this in my
I had the external URL as HTTP, consequently GitLab assumed port 80 and that's what it would respond with when asking for paginated endpoints ( I put this in the variable, note the difference in GITLAB_OMNIBUS_CONFIG: |
# Add any other gitlab.rb configuration here, each on its own line
# I'm including only relevant configs here
external_url 'https://$HOSTNAME'
nginx['listen_port'] = 80
nginx['listen_https'] = false And now it's all working correctly, GitLab responds with HTTPS endpoints. Note: the reason why it worked until it didn't is that my requests initially didn't need pagination until I had added enough labels to the project, so it only used the URL I would provide, which also led me to believe there weren't problems with my input (which is true, the issue lies in the server response) when I tried to perform a manual connection as suggested by @JohnVillalovos to troubleshoot |
Beta Was this translation helpful? Give feedback.
I found out the root cause by printing the server responses from within the urllib library:
So it was a configuration issue, I had this in my
compose.yaml
: