feat: use specific branch with SSH url
- Lenguaje dominante
- Go
- Estrellas
- 300
- Forks
- 64
- Merge medio
- 20 min
- PR fusionados (30 d)
- 1
Descripción
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=git@gitlab.com:your-group/your-repo.git/#refs/heads/sample-branch
(https://discord.com/channels/747933592273027093/1354136229498585158/1354136229498585158)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start by locating the code that parses ENVBUILDER_GIT_URL and compare its handling of the HTTPS and SSH URL examples in the issue. Verify that cloning the SSH URL with /#refs/heads/sample-branch selects that branch, while cloning without a branch still works; no file or test path is named in the payload.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- git, go
- Área
- devops, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100