| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adds SSL certificate verification configuration to the GitLab HVCS client by passing the ssl_verify parameter to the gitlab.Gitlab constructor.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
Thank you for contributing to PSR to help make it better for everyone.
It was actually not intended for this purpose but I am amenable to adapting it to allow insecure SSL configurations. With this in mind, it is important to update the documentation around the insecure option in the configuration to provide an explanation for what it supports. The original intent was to help prevent typos in the configuration for those who might have forgotten the s on https. It would then have to be deliberate to allow a plaintext communication. Separately, we would also need to enable insecure SSL for the other VCS's which use the requests library to be consistent.
Although, I appreciate you have tested it manually, that does not help us prevent regressions in the future. This should be a fairly simple mocking action of the requests library to simulate the SSL failure exception right?
I am glad you listed out your methodology as that is very helpful for understanding the workflow tested. However, I am confused about why you used the publish command? The publish command is disabled for GitLab--did you mean version? Lastly, please only complete the PR checklist when you have completed the actions requested. |
Sorry, something went wrong.
|
This PR has not received a response in 14 days. If no response is received in 7 days, it will be closed. We look forward to hearing from you. |
Sorry, something went wrong.
|
This PR was closed because no response was received. |
Sorry, something went wrong.
|
It has been 90 days since the last update on this confirmed PR. @python-semantic-release/team can you provide an update on the status of this PR? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Purpose
This pull request fixes a bug where python-semantic-release fails to create releases on self-hosted GitLab instances that use self-signed or internally-issued SSL certificates.
When the insecure = true flag is set in pyproject.toml, the release process currently fails with an SSLCertVerificationError, preventing users from publishing releases in their private GitLab environments. This PR ensures that the insecure flag is correctly honored.
Solves: requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed when running semantic-release publish against a self-hosted GitLab instance.
Rationale
The root cause of the issue is that the allow_insecure parameter in the semantic_release.hvcs.gitlab.Gitlab class was not being passed down to the underlying python-gitlab client.
The gitlab.Gitlab constructor accepts an ssl_verify parameter, which defaults to True. The python-semantic-release wrapper did not utilize the allow_insecure flag to modify this behavior. As a result, the python-gitlab client always attempted to verify SSL certificates, regardless of the user's configuration in pyproject.toml.
The solution is to explicitly pass ssl_verify=not allow_insecure during the initialization of the gitlab.Gitlab client within semantic_release/hvcs/gitlab.py. This directly connects the configuration option to the client's behavior, making the insecure flag work as intended.
Workarounds like setting REQUESTS_CA_BUNDLE or GITLAB_SSL_VERIFY environment variables were considered but are less ideal as they require extra configuration in the user's CI/CD environment rather than fixing the bug at its source.
How did you test?
This change was validated through manual end-to-end testing in a CI/CD environment that replicates the original issue.
Methodology:
- uv pip install "git+https://github.com/your-username/python-semantic-release.git@fix/gitlab-ssl-verify"No edge cases were identified, as this change simply wires a boolean flag to its intended destination. Existing unit tests continue to pass.
How to Verify
A reviewer can verify this fix by following these steps:
PR Completion Checklist