Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: use specific branch with SSH url #456

@phorcys420

Description

@phorcys420

It seems that there was an oversight when implementing the branch name parsing in ENVBUILDER_GIT_URL resulting in an inability to use a specific branch when cloning using an SSH URL.

Could we look into implementing this?


When I work with a public repository and use HTTPS, everything works fine. I can clone the main branch and even specify another branch, as described in the documentation, like this:
ENVBUILDER_GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer/#refs/heads/my-feature-branch
However, when I switch to a private repository that requires SSH authentication, I can successfully clone the main branch, but I'm unable to specify a different branch (e.g., sample-branch). Here's the Git URL format I'm using for the private repo:

ENVBUILDER_GIT_URL=[email protected]:your-group/your-repo.git/#refs/heads/sample-branch

(https://discord.com/channels/747933592273027093/1354136229498585158/1354136229498585158)

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