Open jordanbtucker opened 1 year ago
Actually, the rabbit hole goes deeper. Technically git@git.example.com:my-project.git is not a Git URL. It's more like an scp
source. However, git clone
accepts it as a repository source.
The Create a Dev Environment form says that you should be able to provide an HTTPS or SSH URL, however when I do use a valid SSH URL (e.g. ssh://git@git.example.com/~/my-project.git), Docker Desktop just hangs during the Setup step.
Preparing to clone inside a volume
Installing credential helpers...
done
Cloning into '/com.docker.devenvironments.code'...
Granted, ssh://git@git.example.com/~/my-project.git does not point to an existing Git repo. I'm just using it to demonstrate the type of URL I'm using to access my personal Git server. In my tests, I'm using real sources that work with git clone
.
Here's the types of strings I've provided to the Create a Dev Environment form, none of which work with the form, but they do work with git clone
.
https://github.com/g/
, which doesn't exist.)I have found no way to access the Git repos in my personal Git server via this form.
My best advice would be to stop trying to do stuff with the provided URL, and just pass it to git clone
. Or, at the very least, stop assuming everyone is only pulling from GitHub.
Hi, thanks for the report! I'll be transferring this issue to the dev environments issue tracker!
Description
When using the Create a Dev Environment form, it allows you to use an existing Git repo, however it does not allow you to press the Continue button unless it deems that your Git URL is valid. Unfortunately, the Git URL validation is flawed since it requires that your Git URL contain at least one slash.
For example, the following Git URL is valid, however the Create a Dev Environment form does not consider it to be valid.
git@git.example.com:my-project.git
However, the form does consider the following Git URL to be valid.
git@git.example.com:my-username/my-project.git
Not all Git servers follow the GitHub convention of
username/repo
paths. My personal Git server does not follow this convention because it only contains my own projects, so there is no need for a username in the path.Reproduce
Expected behavior
The Create a Dev Environment form should validate Git URLs correctly. Specifically, it should allow valid Git URLs that do not contain a slash.
docker version
docker info
Diagnostics ID
F97CE84A-FE0C-4C8E-9AD8-DC238027E97A/20230911015842
Additional Info
git@git.example.com:my-project.git is a valid Git URL in syntax only. It does not actually point to an existing Git repo.