Skip to content

Issue #13 - [BUG] GitLab clone operations fail for HTTP-only instances #30

@rogelio-cmj

Description

@rogelio-cmj

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:

  1. Configure a GitLab provider in Dokploy that uses an HTTP-only URL (e.g., http://gitlab.internal.company.com)
  2. Create an application or compose project linked to a repository on this GitLab instance
  3. Attempt to deploy or clone the repository
  4. 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

  1. Set up a test GitLab provider with an HTTP URL (or use a mock/test instance)
  2. Link an application to a repository on the HTTP GitLab instance
  3. Trigger a deployment and verify the repository clones successfully
  4. Check the deployment logs to confirm the clone URL uses http:// protocol
  5. Repeat the test with an HTTPS GitLab instance to ensure backward compatibility
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions