Skip to content

Hashtag in branch name not supported #4585

Closed

Description

@GeiOoo

To Reproduce

  1. Setup Gitlab Provider
  2. Create a new application
  3. Select Gitlab Provider
  4. Select repository
  5. Select branch with a hashtag # in the name
  6. Save the configuration

Current vs. Expected behavior

Branchname with a hashtag are not supported:
Image

Without the hashtag:
Image

Provide environment information

Dokploy Version: v0.29.8

Which area(s) are affected? (Select all that apply)

Application

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

No

Activity

  1. dosubot commented on Jun 9, 2026

    @dosubot

    Hi @GeiOoo! I'm Dosu and I'm helping the Dokploy team.

    I can confirm this is a real bug. Branch names are interpolated directly into git clone commands without any shell escaping or URL encoding [1]:

    git clone --branch ${gitlabBranch} --depth 1 ${cloneUrl} ${outputPath} --progress

    The # character is problematic because in shell contexts it starts a comment, which would truncate the command. It also acts as a fragment identifier in URLs, breaking any API calls that include the branch name in the URL path.

    This affects all Git providers (GitHub, GitLab, Bitbucket, Gitea, custom Git) since they all follow the same pattern of directly inserting the branch name into the command string without quoting [2] [3] [4] [5].

    A fix would involve properly quoting the branch name in shell commands (e.g., wrapping ${gitlabBranch} in double quotes like "${gitlabBranch}") and applying encodeURIComponent() where branch names appear in URLs.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dokploy with Dosu Add Dosu to your team

  2. added a commit that references this issue on Jun 30, 2026
    6431e9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions