-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Motivation
Users are prevented from deploying applications or compose files from HTTP-based GitLab instances, limiting the platform's flexibility and causing deployment failures for valid use cases.
Current Behavior
The GitLab repository cloning functionality always constructs clone URLs using the https:// protocol, regardless of the actual protocol used by the GitLab instance. This causes authentication and connection failures when attempting to clone from GitLab instances that only support HTTP.
Reproduction Steps:
- Configure a GitLab provider in Dokploy that uses an HTTP-only URL (e.g.,
http://gitlab.internal.company.com) - Create an application or compose project linked to a repository on this GitLab instance
- Attempt to deploy or clone the repository
- Observe: The clone operation fails because the system tries to connect via HTTPS to an HTTP-only server, resulting in connection errors or authentication failures
Expected Behavior
The system should dynamically detect the protocol (HTTP or HTTPS) from the configured GitLab URL and construct clone URLs using the appropriate protocol. This ensures compatibility with both HTTP and HTTPS GitLab instances.
Acceptance Criteria:
- Clone URLs are constructed using the same protocol (HTTP or HTTPS) as the configured GitLab instance URL
- Applications and compose projects can successfully clone from HTTP-based GitLab instances
- Applications and compose projects continue to work correctly with HTTPS-based GitLab instances
- The clone URL construction logic is consistent across all GitLab cloning functions in the codebase
- OAuth token authentication works correctly with both HTTP and HTTPS protocols
Steps To Test
- Set up a test GitLab provider with an HTTP URL (or use a mock/test instance)
- Link an application to a repository on the HTTP GitLab instance
- Trigger a deployment and verify the repository clones successfully
- Check the deployment logs to confirm the clone URL uses
http://protocol - Repeat the test with an HTTPS GitLab instance to ensure backward compatibility
- Verify that compose projects also work correctly with both HTTP and HTTPS GitLab instances
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx